diff options
Diffstat (limited to 'include/asm-x86')
| -rw-r--r-- | include/asm-x86/bootparam.h | 8 | ||||
| -rw-r--r-- | include/asm-x86/div64.h | 34 | ||||
| -rw-r--r-- | include/asm-x86/dmi.h | 1 | ||||
| -rw-r--r-- | include/asm-x86/futex.h | 2 | ||||
| -rw-r--r-- | include/asm-x86/io_32.h | 5 | ||||
| -rw-r--r-- | include/asm-x86/kvm_host.h | 10 | ||||
| -rw-r--r-- | include/asm-x86/mach-default/mach_apic.h | 7 | ||||
| -rw-r--r-- | include/asm-x86/olpc.h | 132 | ||||
| -rw-r--r-- | include/asm-x86/pci.h | 2 | ||||
| -rw-r--r-- | include/asm-x86/processor.h | 3 | ||||
| -rw-r--r-- | include/asm-x86/proto.h | 4 | ||||
| -rw-r--r-- | include/asm-x86/thread_info_32.h | 13 | ||||
| -rw-r--r-- | include/asm-x86/thread_info_64.h | 13 | ||||
| -rw-r--r-- | include/asm-x86/time.h | 1 | ||||
| -rw-r--r-- | include/asm-x86/topology.h | 20 | ||||
| -rw-r--r-- | include/asm-x86/tsc.h | 2 | ||||
| -rw-r--r-- | include/asm-x86/types.h | 38 | ||||
| -rw-r--r-- | include/asm-x86/unaligned.h | 31 |
18 files changed, 220 insertions, 106 deletions
diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h index e8659909e5f6..f62f4733606b 100644 --- a/include/asm-x86/bootparam.h +++ b/include/asm-x86/bootparam.h | |||
| @@ -14,10 +14,10 @@ | |||
| 14 | 14 | ||
| 15 | /* extensible setup data list node */ | 15 | /* extensible setup data list node */ |
| 16 | struct setup_data { | 16 | struct setup_data { |
| 17 | u64 next; | 17 | __u64 next; |
| 18 | u32 type; | 18 | __u32 type; |
| 19 | u32 len; | 19 | __u32 len; |
| 20 | u8 data[0]; | 20 | __u8 data[0]; |
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| 23 | struct setup_header { | 23 | struct setup_header { |
diff --git a/include/asm-x86/div64.h b/include/asm-x86/div64.h index 0dbf8bf3ef0a..9a2d644c08ef 100644 --- a/include/asm-x86/div64.h +++ b/include/asm-x86/div64.h | |||
| @@ -33,25 +33,25 @@ | |||
| 33 | __mod; \ | 33 | __mod; \ |
| 34 | }) | 34 | }) |
| 35 | 35 | ||
| 36 | /* | 36 | static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) |
| 37 | * (long)X = ((long long)divs) / (long)div | ||
| 38 | * (long)rem = ((long long)divs) % (long)div | ||
| 39 | * | ||
| 40 | * Warning, this will do an exception if X overflows. | ||
| 41 | */ | ||
| 42 | #define div_long_long_rem(a, b, c) div_ll_X_l_rem(a, b, c) | ||
| 43 | |||
| 44 | static inline long div_ll_X_l_rem(long long divs, long div, long *rem) | ||
| 45 | { | 37 | { |
| 46 | long dum2; | 38 | union { |
| 47 | asm("divl %2":"=a"(dum2), "=d"(*rem) | 39 | u64 v64; |
| 48 | : "rm"(div), "A"(divs)); | 40 | u32 v32[2]; |
| 49 | 41 | } d = { dividend }; | |
| 50 | return dum2; | 42 | u32 upper; |
| 51 | 43 | ||
| 44 | upper = d.v32[1]; | ||
| 45 | d.v32[1] = 0; | ||
| 46 | if (upper >= divisor) { | ||
| 47 | d.v32[1] = upper / divisor; | ||
| 48 | upper %= divisor; | ||
| 49 | } | ||
| 50 | asm ("divl %2" : "=a" (d.v32[0]), "=d" (*remainder) : | ||
| 51 | "rm" (divisor), "0" (d.v32[0]), "1" (upper)); | ||
| 52 | return d.v64; | ||
| 52 | } | 53 | } |
| 53 | 54 | #define div_u64_rem div_u64_rem | |
| 54 | extern uint64_t div64_64(uint64_t dividend, uint64_t divisor); | ||
| 55 | 55 | ||
| 56 | #else | 56 | #else |
| 57 | # include <asm-generic/div64.h> | 57 | # include <asm-generic/div64.h> |
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h index 1241e6ad1935..4edf7514a750 100644 --- a/include/asm-x86/dmi.h +++ b/include/asm-x86/dmi.h | |||
| @@ -27,6 +27,7 @@ static inline void *dmi_alloc(unsigned len) | |||
| 27 | 27 | ||
| 28 | #endif | 28 | #endif |
| 29 | 29 | ||
| 30 | /* Use early IO mappings for DMI because it's initialized early */ | ||
| 30 | #define dmi_ioremap early_ioremap | 31 | #define dmi_ioremap early_ioremap |
| 31 | #define dmi_iounmap early_iounmap | 32 | #define dmi_iounmap early_iounmap |
| 32 | 33 | ||
diff --git a/include/asm-x86/futex.h b/include/asm-x86/futex.h index ac0fbf24d722..e7a76b37b333 100644 --- a/include/asm-x86/futex.h +++ b/include/asm-x86/futex.h | |||
| @@ -4,12 +4,12 @@ | |||
| 4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
| 5 | 5 | ||
| 6 | #include <linux/futex.h> | 6 | #include <linux/futex.h> |
| 7 | #include <linux/uaccess.h> | ||
| 7 | 8 | ||
| 8 | #include <asm/asm.h> | 9 | #include <asm/asm.h> |
| 9 | #include <asm/errno.h> | 10 | #include <asm/errno.h> |
| 10 | #include <asm/processor.h> | 11 | #include <asm/processor.h> |
| 11 | #include <asm/system.h> | 12 | #include <asm/system.h> |
| 12 | #include <asm/uaccess.h> | ||
| 13 | 13 | ||
| 14 | #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ | 14 | #define __futex_atomic_op1(insn, ret, oldval, uaddr, oparg) \ |
| 15 | asm volatile("1:\t" insn "\n" \ | 15 | asm volatile("1:\t" insn "\n" \ |
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h index 6e73467a4fb1..049e81e797a0 100644 --- a/include/asm-x86/io_32.h +++ b/include/asm-x86/io_32.h | |||
| @@ -133,11 +133,6 @@ extern void *early_ioremap(unsigned long offset, unsigned long size); | |||
| 133 | extern void early_iounmap(void *addr, unsigned long size); | 133 | extern void early_iounmap(void *addr, unsigned long size); |
| 134 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | 134 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); |
| 135 | 135 | ||
| 136 | /* Use early IO mappings for DMI because it's initialized early */ | ||
| 137 | #define dmi_ioremap early_ioremap | ||
| 138 | #define dmi_iounmap early_iounmap | ||
| 139 | #define dmi_alloc alloc_bootmem | ||
| 140 | |||
| 141 | /* | 136 | /* |
| 142 | * ISA I/O bus memory addresses are 1:1 with the physical address. | 137 | * ISA I/O bus memory addresses are 1:1 with the physical address. |
| 143 | */ | 138 | */ |
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 9d963cd6533c..1d8cd01fa514 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
| @@ -314,6 +314,9 @@ struct kvm_arch{ | |||
| 314 | struct page *apic_access_page; | 314 | struct page *apic_access_page; |
| 315 | 315 | ||
| 316 | gpa_t wall_clock; | 316 | gpa_t wall_clock; |
| 317 | |||
| 318 | struct page *ept_identity_pagetable; | ||
| 319 | bool ept_identity_pagetable_done; | ||
| 317 | }; | 320 | }; |
| 318 | 321 | ||
| 319 | struct kvm_vm_stat { | 322 | struct kvm_vm_stat { |
| @@ -422,6 +425,7 @@ struct kvm_x86_ops { | |||
| 422 | struct kvm_run *run); | 425 | struct kvm_run *run); |
| 423 | 426 | ||
| 424 | int (*set_tss_addr)(struct kvm *kvm, unsigned int addr); | 427 | int (*set_tss_addr)(struct kvm *kvm, unsigned int addr); |
| 428 | int (*get_tdp_level)(void); | ||
| 425 | }; | 429 | }; |
| 426 | 430 | ||
| 427 | extern struct kvm_x86_ops *kvm_x86_ops; | 431 | extern struct kvm_x86_ops *kvm_x86_ops; |
| @@ -433,6 +437,9 @@ void kvm_mmu_destroy(struct kvm_vcpu *vcpu); | |||
| 433 | int kvm_mmu_create(struct kvm_vcpu *vcpu); | 437 | int kvm_mmu_create(struct kvm_vcpu *vcpu); |
| 434 | int kvm_mmu_setup(struct kvm_vcpu *vcpu); | 438 | int kvm_mmu_setup(struct kvm_vcpu *vcpu); |
| 435 | void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); | 439 | void kvm_mmu_set_nonpresent_ptes(u64 trap_pte, u64 notrap_pte); |
| 440 | void kvm_mmu_set_base_ptes(u64 base_pte); | ||
| 441 | void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask, | ||
| 442 | u64 dirty_mask, u64 nx_mask, u64 x_mask); | ||
| 436 | 443 | ||
| 437 | int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); | 444 | int kvm_mmu_reset_context(struct kvm_vcpu *vcpu); |
| 438 | void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); | 445 | void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); |
| @@ -620,7 +627,7 @@ static inline void fx_restore(struct i387_fxsave_struct *image) | |||
| 620 | asm("fxrstor (%0)":: "r" (image)); | 627 | asm("fxrstor (%0)":: "r" (image)); |
| 621 | } | 628 | } |
| 622 | 629 | ||
| 623 | static inline void fpu_init(void) | 630 | static inline void fx_finit(void) |
| 624 | { | 631 | { |
| 625 | asm("finit"); | 632 | asm("finit"); |
| 626 | } | 633 | } |
| @@ -644,6 +651,7 @@ static inline void kvm_inject_gp(struct kvm_vcpu *vcpu, u32 error_code) | |||
| 644 | #define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4" | 651 | #define ASM_VMX_VMWRITE_RSP_RDX ".byte 0x0f, 0x79, 0xd4" |
| 645 | #define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4" | 652 | #define ASM_VMX_VMXOFF ".byte 0x0f, 0x01, 0xc4" |
| 646 | #define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30" | 653 | #define ASM_VMX_VMXON_RAX ".byte 0xf3, 0x0f, 0xc7, 0x30" |
| 654 | #define ASM_VMX_INVEPT ".byte 0x66, 0x0f, 0x38, 0x80, 0x08" | ||
| 647 | #define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08" | 655 | #define ASM_VMX_INVVPID ".byte 0x66, 0x0f, 0x38, 0x81, 0x08" |
| 648 | 656 | ||
| 649 | #define MSR_IA32_TIME_STAMP_COUNTER 0x010 | 657 | #define MSR_IA32_TIME_STAMP_COUNTER 0x010 |
diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h index 0a6634f62abe..21003b56ae95 100644 --- a/include/asm-x86/mach-default/mach_apic.h +++ b/include/asm-x86/mach-default/mach_apic.h | |||
| @@ -109,13 +109,8 @@ static inline int cpu_to_logical_apicid(int cpu) | |||
| 109 | 109 | ||
| 110 | static inline int cpu_present_to_apicid(int mps_cpu) | 110 | static inline int cpu_present_to_apicid(int mps_cpu) |
| 111 | { | 111 | { |
| 112 | #ifdef CONFIG_X86_64 | 112 | if (mps_cpu < NR_CPUS && cpu_present(mps_cpu)) |
| 113 | if (cpu_present(mps_cpu)) | ||
| 114 | return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); | 113 | return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); |
| 115 | #else | ||
| 116 | if (mps_cpu < get_physical_broadcast()) | ||
| 117 | return mps_cpu; | ||
| 118 | #endif | ||
| 119 | else | 114 | else |
| 120 | return BAD_APICID; | 115 | return BAD_APICID; |
| 121 | } | 116 | } |
diff --git a/include/asm-x86/olpc.h b/include/asm-x86/olpc.h new file mode 100644 index 000000000000..97d47133486f --- /dev/null +++ b/include/asm-x86/olpc.h | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | /* OLPC machine specific definitions */ | ||
| 2 | |||
| 3 | #ifndef ASM_OLPC_H_ | ||
| 4 | #define ASM_OLPC_H_ | ||
| 5 | |||
| 6 | #include <asm/geode.h> | ||
| 7 | |||
| 8 | struct olpc_platform_t { | ||
| 9 | int flags; | ||
| 10 | uint32_t boardrev; | ||
| 11 | int ecver; | ||
| 12 | }; | ||
| 13 | |||
| 14 | #define OLPC_F_PRESENT 0x01 | ||
| 15 | #define OLPC_F_DCON 0x02 | ||
| 16 | #define OLPC_F_VSA 0x04 | ||
| 17 | |||
| 18 | #ifdef CONFIG_OLPC | ||
| 19 | |||
| 20 | extern struct olpc_platform_t olpc_platform_info; | ||
| 21 | |||
| 22 | /* | ||
| 23 | * OLPC board IDs contain the major build number within the mask 0x0ff0, | ||
| 24 | * and the minor build number withing 0x000f. Pre-builds have a minor | ||
| 25 | * number less than 8, and normal builds start at 8. For example, 0x0B10 | ||
| 26 | * is a PreB1, and 0x0C18 is a C1. | ||
| 27 | */ | ||
| 28 | |||
| 29 | static inline uint32_t olpc_board(uint8_t id) | ||
| 30 | { | ||
| 31 | return (id << 4) | 0x8; | ||
| 32 | } | ||
| 33 | |||
| 34 | static inline uint32_t olpc_board_pre(uint8_t id) | ||
| 35 | { | ||
| 36 | return id << 4; | ||
| 37 | } | ||
| 38 | |||
| 39 | static inline int machine_is_olpc(void) | ||
| 40 | { | ||
| 41 | return (olpc_platform_info.flags & OLPC_F_PRESENT) ? 1 : 0; | ||
| 42 | } | ||
| 43 | |||
| 44 | /* | ||
| 45 | * The DCON is OLPC's Display Controller. It has a number of unique | ||
| 46 | * features that we might want to take advantage of.. | ||
| 47 | */ | ||
| 48 | static inline int olpc_has_dcon(void) | ||
| 49 | { | ||
| 50 | return (olpc_platform_info.flags & OLPC_F_DCON) ? 1 : 0; | ||
| 51 | } | ||
| 52 | |||
| 53 | /* | ||
| 54 | * The VSA is software from AMD that typical Geode bioses will include. | ||
| 55 | * It is used to emulate the PCI bus, VGA, etc. OLPC's Open Firmware does | ||
| 56 | * not include the VSA; instead, PCI is emulated by the kernel. | ||
| 57 | * | ||
| 58 | * The VSA is described further in arch/x86/pci/olpc.c. | ||
| 59 | */ | ||
| 60 | static inline int olpc_has_vsa(void) | ||
| 61 | { | ||
| 62 | return (olpc_platform_info.flags & OLPC_F_VSA) ? 1 : 0; | ||
| 63 | } | ||
| 64 | |||
| 65 | /* | ||
| 66 | * The "Mass Production" version of OLPC's XO is identified as being model | ||
| 67 | * C2. During the prototype phase, the following models (in chronological | ||
| 68 | * order) were created: A1, B1, B2, B3, B4, C1. The A1 through B2 models | ||
| 69 | * were based on Geode GX CPUs, and models after that were based upon | ||
| 70 | * Geode LX CPUs. There were also some hand-assembled models floating | ||
| 71 | * around, referred to as PreB1, PreB2, etc. | ||
| 72 | */ | ||
| 73 | static inline int olpc_board_at_least(uint32_t rev) | ||
| 74 | { | ||
| 75 | return olpc_platform_info.boardrev >= rev; | ||
| 76 | } | ||
| 77 | |||
| 78 | #else | ||
| 79 | |||
| 80 | static inline int machine_is_olpc(void) | ||
| 81 | { | ||
| 82 | return 0; | ||
| 83 | } | ||
| 84 | |||
| 85 | static inline int olpc_has_dcon(void) | ||
| 86 | { | ||
| 87 | return 0; | ||
| 88 | } | ||
| 89 | |||
| 90 | static inline int olpc_has_vsa(void) | ||
| 91 | { | ||
| 92 | return 0; | ||
| 93 | } | ||
| 94 | |||
| 95 | #endif | ||
| 96 | |||
| 97 | /* EC related functions */ | ||
| 98 | |||
| 99 | extern int olpc_ec_cmd(unsigned char cmd, unsigned char *inbuf, size_t inlen, | ||
| 100 | unsigned char *outbuf, size_t outlen); | ||
| 101 | |||
| 102 | extern int olpc_ec_mask_set(uint8_t bits); | ||
| 103 | extern int olpc_ec_mask_unset(uint8_t bits); | ||
| 104 | |||
| 105 | /* EC commands */ | ||
| 106 | |||
| 107 | #define EC_FIRMWARE_REV 0x08 | ||
| 108 | |||
| 109 | /* SCI source values */ | ||
| 110 | |||
| 111 | #define EC_SCI_SRC_EMPTY 0x00 | ||
| 112 | #define EC_SCI_SRC_GAME 0x01 | ||
| 113 | #define EC_SCI_SRC_BATTERY 0x02 | ||
| 114 | #define EC_SCI_SRC_BATSOC 0x04 | ||
| 115 | #define EC_SCI_SRC_BATERR 0x08 | ||
| 116 | #define EC_SCI_SRC_EBOOK 0x10 | ||
| 117 | #define EC_SCI_SRC_WLAN 0x20 | ||
| 118 | #define EC_SCI_SRC_ACPWR 0x40 | ||
| 119 | #define EC_SCI_SRC_ALL 0x7F | ||
| 120 | |||
| 121 | /* GPIO assignments */ | ||
| 122 | |||
| 123 | #define OLPC_GPIO_MIC_AC geode_gpio(1) | ||
| 124 | #define OLPC_GPIO_DCON_IRQ geode_gpio(7) | ||
| 125 | #define OLPC_GPIO_THRM_ALRM geode_gpio(10) | ||
| 126 | #define OLPC_GPIO_SMB_CLK geode_gpio(14) | ||
| 127 | #define OLPC_GPIO_SMB_DATA geode_gpio(15) | ||
| 128 | #define OLPC_GPIO_WORKAUX geode_gpio(24) | ||
| 129 | #define OLPC_GPIO_LID geode_gpio(26) | ||
| 130 | #define OLPC_GPIO_ECSCI geode_gpio(27) | ||
| 131 | |||
| 132 | #endif | ||
diff --git a/include/asm-x86/pci.h b/include/asm-x86/pci.h index ddd8e248fc0a..30bbde0cb34b 100644 --- a/include/asm-x86/pci.h +++ b/include/asm-x86/pci.h | |||
| @@ -19,6 +19,8 @@ struct pci_sysdata { | |||
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | /* scan a bus after allocating a pci_sysdata for it */ | 21 | /* scan a bus after allocating a pci_sysdata for it */ |
| 22 | extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, | ||
| 23 | int node); | ||
| 22 | extern struct pci_bus *pci_scan_bus_with_sysdata(int busno); | 24 | extern struct pci_bus *pci_scan_bus_with_sysdata(int busno); |
| 23 | 25 | ||
| 24 | static inline int pci_domain_nr(struct pci_bus *bus) | 26 | static inline int pci_domain_nr(struct pci_bus *bus) |
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index 2e7974ec77ec..559105220a47 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
| @@ -3,9 +3,6 @@ | |||
| 3 | 3 | ||
| 4 | #include <asm/processor-flags.h> | 4 | #include <asm/processor-flags.h> |
| 5 | 5 | ||
| 6 | /* migration helper, for KVM - will be removed in 2.6.25: */ | ||
| 7 | #define Xgt_desc_struct desc_ptr | ||
| 8 | |||
| 9 | /* Forward declaration, a strange C thing */ | 6 | /* Forward declaration, a strange C thing */ |
| 10 | struct task_struct; | 7 | struct task_struct; |
| 11 | struct mm_struct; | 8 | struct mm_struct; |
diff --git a/include/asm-x86/proto.h b/include/asm-x86/proto.h index 1e17bcce450e..6c8b41b03f6d 100644 --- a/include/asm-x86/proto.h +++ b/include/asm-x86/proto.h | |||
| @@ -20,7 +20,11 @@ extern void syscall32_cpu_init(void); | |||
| 20 | 20 | ||
| 21 | extern void check_efer(void); | 21 | extern void check_efer(void); |
| 22 | 22 | ||
| 23 | #ifdef CONFIG_X86_BIOS_REBOOT | ||
| 23 | extern int reboot_force; | 24 | extern int reboot_force; |
| 25 | #else | ||
| 26 | static const int reboot_force = 0; | ||
| 27 | #endif | ||
| 24 | 28 | ||
| 25 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr); | 29 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr); |
| 26 | 30 | ||
diff --git a/include/asm-x86/thread_info_32.h b/include/asm-x86/thread_info_32.h index 531859962096..b6338829d1a8 100644 --- a/include/asm-x86/thread_info_32.h +++ b/include/asm-x86/thread_info_32.h | |||
| @@ -131,7 +131,6 @@ static inline struct thread_info *current_thread_info(void) | |||
| 131 | #define TIF_SYSCALL_EMU 5 /* syscall emulation active */ | 131 | #define TIF_SYSCALL_EMU 5 /* syscall emulation active */ |
| 132 | #define TIF_SYSCALL_AUDIT 6 /* syscall auditing active */ | 132 | #define TIF_SYSCALL_AUDIT 6 /* syscall auditing active */ |
| 133 | #define TIF_SECCOMP 7 /* secure computing */ | 133 | #define TIF_SECCOMP 7 /* secure computing */ |
| 134 | #define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal() */ | ||
| 135 | #define TIF_HRTICK_RESCHED 9 /* reprogram hrtick timer */ | 134 | #define TIF_HRTICK_RESCHED 9 /* reprogram hrtick timer */ |
| 136 | #define TIF_MEMDIE 16 | 135 | #define TIF_MEMDIE 16 |
| 137 | #define TIF_DEBUG 17 /* uses debug registers */ | 136 | #define TIF_DEBUG 17 /* uses debug registers */ |
| @@ -151,7 +150,6 @@ static inline struct thread_info *current_thread_info(void) | |||
| 151 | #define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU) | 150 | #define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU) |
| 152 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 151 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
| 153 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 152 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
| 154 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
| 155 | #define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED) | 153 | #define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED) |
| 156 | #define _TIF_DEBUG (1 << TIF_DEBUG) | 154 | #define _TIF_DEBUG (1 << TIF_DEBUG) |
| 157 | #define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP) | 155 | #define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP) |
| @@ -188,9 +186,20 @@ static inline struct thread_info *current_thread_info(void) | |||
| 188 | this quantum (SMP) */ | 186 | this quantum (SMP) */ |
| 189 | #define TS_POLLING 0x0002 /* True if in idle loop | 187 | #define TS_POLLING 0x0002 /* True if in idle loop |
| 190 | and not sleeping */ | 188 | and not sleeping */ |
| 189 | #define TS_RESTORE_SIGMASK 0x0004 /* restore signal mask in do_signal() */ | ||
| 191 | 190 | ||
| 192 | #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) | 191 | #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) |
| 193 | 192 | ||
| 193 | #ifndef __ASSEMBLY__ | ||
| 194 | #define HAVE_SET_RESTORE_SIGMASK 1 | ||
| 195 | static inline void set_restore_sigmask(void) | ||
| 196 | { | ||
| 197 | struct thread_info *ti = current_thread_info(); | ||
| 198 | ti->status |= TS_RESTORE_SIGMASK; | ||
| 199 | set_bit(TIF_SIGPENDING, &ti->flags); | ||
| 200 | } | ||
| 201 | #endif /* !__ASSEMBLY__ */ | ||
| 202 | |||
| 194 | #endif /* __KERNEL__ */ | 203 | #endif /* __KERNEL__ */ |
| 195 | 204 | ||
| 196 | #endif /* _ASM_THREAD_INFO_H */ | 205 | #endif /* _ASM_THREAD_INFO_H */ |
diff --git a/include/asm-x86/thread_info_64.h b/include/asm-x86/thread_info_64.h index ed664e874dec..cb69f70abba1 100644 --- a/include/asm-x86/thread_info_64.h +++ b/include/asm-x86/thread_info_64.h | |||
| @@ -109,7 +109,6 @@ static inline struct thread_info *stack_thread_info(void) | |||
| 109 | #define TIF_IRET 5 /* force IRET */ | 109 | #define TIF_IRET 5 /* force IRET */ |
| 110 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 110 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
| 111 | #define TIF_SECCOMP 8 /* secure computing */ | 111 | #define TIF_SECCOMP 8 /* secure computing */ |
| 112 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */ | ||
| 113 | #define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */ | 112 | #define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */ |
| 114 | #define TIF_HRTICK_RESCHED 11 /* reprogram hrtick timer */ | 113 | #define TIF_HRTICK_RESCHED 11 /* reprogram hrtick timer */ |
| 115 | /* 16 free */ | 114 | /* 16 free */ |
| @@ -133,7 +132,6 @@ static inline struct thread_info *stack_thread_info(void) | |||
| 133 | #define _TIF_IRET (1 << TIF_IRET) | 132 | #define _TIF_IRET (1 << TIF_IRET) |
| 134 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 133 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
| 135 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 134 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
| 136 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
| 137 | #define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY) | 135 | #define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY) |
| 138 | #define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED) | 136 | #define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED) |
| 139 | #define _TIF_IA32 (1 << TIF_IA32) | 137 | #define _TIF_IA32 (1 << TIF_IA32) |
| @@ -178,9 +176,20 @@ static inline struct thread_info *stack_thread_info(void) | |||
| 178 | #define TS_COMPAT 0x0002 /* 32bit syscall active */ | 176 | #define TS_COMPAT 0x0002 /* 32bit syscall active */ |
| 179 | #define TS_POLLING 0x0004 /* true if in idle loop | 177 | #define TS_POLLING 0x0004 /* true if in idle loop |
| 180 | and not sleeping */ | 178 | and not sleeping */ |
| 179 | #define TS_RESTORE_SIGMASK 0x0008 /* restore signal mask in do_signal() */ | ||
| 181 | 180 | ||
| 182 | #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) | 181 | #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING) |
| 183 | 182 | ||
| 183 | #ifndef __ASSEMBLY__ | ||
| 184 | #define HAVE_SET_RESTORE_SIGMASK 1 | ||
| 185 | static inline void set_restore_sigmask(void) | ||
| 186 | { | ||
| 187 | struct thread_info *ti = current_thread_info(); | ||
| 188 | ti->status |= TS_RESTORE_SIGMASK; | ||
| 189 | set_bit(TIF_SIGPENDING, &ti->flags); | ||
| 190 | } | ||
| 191 | #endif /* !__ASSEMBLY__ */ | ||
| 192 | |||
| 184 | #endif /* __KERNEL__ */ | 193 | #endif /* __KERNEL__ */ |
| 185 | 194 | ||
| 186 | #endif /* _ASM_THREAD_INFO_H */ | 195 | #endif /* _ASM_THREAD_INFO_H */ |
diff --git a/include/asm-x86/time.h b/include/asm-x86/time.h index 68779b048a3e..bce72d7a958c 100644 --- a/include/asm-x86/time.h +++ b/include/asm-x86/time.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #ifndef _ASMX86_TIME_H | 1 | #ifndef _ASMX86_TIME_H |
| 2 | #define _ASMX86_TIME_H | 2 | #define _ASMX86_TIME_H |
| 3 | 3 | ||
| 4 | extern void (*late_time_init)(void); | ||
| 5 | extern void hpet_time_init(void); | 4 | extern void hpet_time_init(void); |
| 6 | 5 | ||
| 7 | #include <asm/mc146818rtc.h> | 6 | #include <asm/mc146818rtc.h> |
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h index 22073268b481..4f35a0fb4f22 100644 --- a/include/asm-x86/topology.h +++ b/include/asm-x86/topology.h | |||
| @@ -193,9 +193,29 @@ extern cpumask_t cpu_coregroup_map(int cpu); | |||
| 193 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | 193 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) |
| 194 | #endif | 194 | #endif |
| 195 | 195 | ||
| 196 | static inline void arch_fix_phys_package_id(int num, u32 slot) | ||
| 197 | { | ||
| 198 | } | ||
| 199 | |||
| 200 | struct pci_bus; | ||
| 201 | void set_pci_bus_resources_arch_default(struct pci_bus *b); | ||
| 202 | |||
| 196 | #ifdef CONFIG_SMP | 203 | #ifdef CONFIG_SMP |
| 197 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) | 204 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) |
| 198 | #define smt_capable() (smp_num_siblings > 1) | 205 | #define smt_capable() (smp_num_siblings > 1) |
| 199 | #endif | 206 | #endif |
| 200 | 207 | ||
| 208 | #ifdef CONFIG_NUMA | ||
| 209 | extern int get_mp_bus_to_node(int busnum); | ||
| 210 | extern void set_mp_bus_to_node(int busnum, int node); | ||
| 211 | #else | ||
| 212 | static inline int get_mp_bus_to_node(int busnum) | ||
| 213 | { | ||
| 214 | return 0; | ||
| 215 | } | ||
| 216 | static inline void set_mp_bus_to_node(int busnum, int node) | ||
| 217 | { | ||
| 218 | } | ||
| 219 | #endif | ||
| 220 | |||
| 201 | #endif | 221 | #endif |
diff --git a/include/asm-x86/tsc.h b/include/asm-x86/tsc.h index d2d8eb5b55f5..548873ab5fc1 100644 --- a/include/asm-x86/tsc.h +++ b/include/asm-x86/tsc.h | |||
| @@ -32,7 +32,7 @@ static inline cycles_t get_cycles(void) | |||
| 32 | return ret; | 32 | return ret; |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | static inline cycles_t vget_cycles(void) | 35 | static __always_inline cycles_t vget_cycles(void) |
| 36 | { | 36 | { |
| 37 | /* | 37 | /* |
| 38 | * We only do VDSOs on TSC capable CPUs, so this shouldnt | 38 | * We only do VDSOs on TSC capable CPUs, so this shouldnt |
diff --git a/include/asm-x86/types.h b/include/asm-x86/types.h index 63733f315688..1ac80cd9acf8 100644 --- a/include/asm-x86/types.h +++ b/include/asm-x86/types.h | |||
| @@ -1,34 +1,12 @@ | |||
| 1 | #ifndef _ASM_X86_TYPES_H | 1 | #ifndef _ASM_X86_TYPES_H |
| 2 | #define _ASM_X86_TYPES_H | 2 | #define _ASM_X86_TYPES_H |
| 3 | 3 | ||
| 4 | #include <asm-generic/int-ll64.h> | ||
| 5 | |||
| 4 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
| 5 | 7 | ||
| 6 | typedef unsigned short umode_t; | 8 | typedef unsigned short umode_t; |
| 7 | 9 | ||
| 8 | /* | ||
| 9 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
| 10 | * header files exported to user space | ||
| 11 | */ | ||
| 12 | |||
| 13 | typedef __signed__ char __s8; | ||
| 14 | typedef unsigned char __u8; | ||
| 15 | |||
| 16 | typedef __signed__ short __s16; | ||
| 17 | typedef unsigned short __u16; | ||
| 18 | |||
| 19 | typedef __signed__ int __s32; | ||
| 20 | typedef unsigned int __u32; | ||
| 21 | |||
| 22 | #ifdef __i386__ | ||
| 23 | # ifdef __GNUC__ | ||
| 24 | __extension__ typedef __signed__ long long __s64; | ||
| 25 | __extension__ typedef unsigned long long __u64; | ||
| 26 | # endif | ||
| 27 | #else | ||
| 28 | typedef __signed__ long long __s64; | ||
| 29 | typedef unsigned long long __u64; | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #endif /* __ASSEMBLY__ */ | 10 | #endif /* __ASSEMBLY__ */ |
| 33 | 11 | ||
| 34 | /* | 12 | /* |
| @@ -44,18 +22,6 @@ typedef unsigned long long __u64; | |||
| 44 | 22 | ||
| 45 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
| 46 | 24 | ||
| 47 | typedef signed char s8; | ||
| 48 | typedef unsigned char u8; | ||
| 49 | |||
| 50 | typedef signed short s16; | ||
| 51 | typedef unsigned short u16; | ||
| 52 | |||
| 53 | typedef signed int s32; | ||
| 54 | typedef unsigned int u32; | ||
| 55 | |||
| 56 | typedef signed long long s64; | ||
| 57 | typedef unsigned long long u64; | ||
| 58 | |||
| 59 | typedef u64 dma64_addr_t; | 25 | typedef u64 dma64_addr_t; |
| 60 | #if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G) | 26 | #if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G) |
| 61 | /* DMA addresses come in 32-bit and 64-bit flavours. */ | 27 | /* DMA addresses come in 32-bit and 64-bit flavours. */ |
diff --git a/include/asm-x86/unaligned.h b/include/asm-x86/unaligned.h index d270ffe72759..a7bd416b4763 100644 --- a/include/asm-x86/unaligned.h +++ b/include/asm-x86/unaligned.h | |||
| @@ -3,35 +3,12 @@ | |||
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * The x86 can do unaligned accesses itself. | 5 | * The x86 can do unaligned accesses itself. |
| 6 | * | ||
| 7 | * The strange macros are there to make sure these can't | ||
| 8 | * be misused in a way that makes them not work on other | ||
| 9 | * architectures where unaligned accesses aren't as simple. | ||
| 10 | */ | 6 | */ |
| 11 | 7 | ||
| 12 | /** | 8 | #include <linux/unaligned/access_ok.h> |
| 13 | * get_unaligned - get value from possibly mis-aligned location | 9 | #include <linux/unaligned/generic.h> |
| 14 | * @ptr: pointer to value | ||
| 15 | * | ||
| 16 | * This macro should be used for accessing values larger in size than | ||
| 17 | * single bytes at locations that are expected to be improperly aligned, | ||
| 18 | * e.g. retrieving a u16 value from a location not u16-aligned. | ||
| 19 | * | ||
| 20 | * Note that unaligned accesses can be very expensive on some architectures. | ||
| 21 | */ | ||
| 22 | #define get_unaligned(ptr) (*(ptr)) | ||
| 23 | 10 | ||
| 24 | /** | 11 | #define get_unaligned __get_unaligned_le |
| 25 | * put_unaligned - put value to a possibly mis-aligned location | 12 | #define put_unaligned __put_unaligned_le |
| 26 | * @val: value to place | ||
| 27 | * @ptr: pointer to location | ||
| 28 | * | ||
| 29 | * This macro should be used for placing values larger in size than | ||
| 30 | * single bytes at locations that are expected to be improperly aligned, | ||
| 31 | * e.g. writing a u16 value to a location not u16-aligned. | ||
| 32 | * | ||
| 33 | * Note that unaligned accesses can be very expensive on some architectures. | ||
| 34 | */ | ||
| 35 | #define put_unaligned(val, ptr) ((void)(*(ptr) = (val))) | ||
| 36 | 13 | ||
| 37 | #endif /* _ASM_X86_UNALIGNED_H */ | 14 | #endif /* _ASM_X86_UNALIGNED_H */ |
