Rev 6934 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6934 | Rev 7143 | ||
---|---|---|---|
Line 11... | Line 11... | ||
11 | #include |
11 | #include |
12 | #include |
12 | #include |
13 | #include |
13 | #include |
14 | #include |
14 | #include |
15 | #include |
15 | #include |
16 | #include |
16 | #include |
17 | #include |
17 | #include |
18 | #include |
18 | #include |
19 | #include |
19 | #include |
20 | #include |
20 | #include |
21 | #include |
21 | #include |
22 | #include |
22 | #include |
23 | #include |
23 | #include |
24 | #include |
24 | #include |
Line 25... | Line 25... | ||
25 | 25 | ||
26 | #include |
- | |
27 | #include |
26 | #include |
28 | #include |
27 | #include |
29 | #include |
28 | #include |
30 | #include |
29 | #include |
31 | #include |
30 | #include |
Line 127... | Line 126... | ||
127 | u16 x86_clflush_size; |
126 | u16 x86_clflush_size; |
128 | /* number of cores as seen by the OS: */ |
127 | /* number of cores as seen by the OS: */ |
129 | u16 booted_cores; |
128 | u16 booted_cores; |
130 | /* Physical processor id: */ |
129 | /* Physical processor id: */ |
131 | u16 phys_proc_id; |
130 | u16 phys_proc_id; |
- | 131 | /* Logical processor id: */ |
|
- | 132 | u16 logical_proc_id; |
|
132 | /* Core id: */ |
133 | /* Core id: */ |
133 | u16 cpu_core_id; |
134 | u16 cpu_core_id; |
134 | /* Compute unit id */ |
- | |
135 | u8 compute_unit_id; |
- | |
136 | /* Index into per_cpu list: */ |
135 | /* Index into per_cpu list: */ |
137 | u16 cpu_index; |
136 | u16 cpu_index; |
138 | u32 microcode; |
137 | u32 microcode; |
139 | }; |
138 | }; |
Line 294... | Line 293... | ||
294 | * bitmap. The extra byte must be all 1 bits, and must |
293 | * bitmap. The extra byte must be all 1 bits, and must |
295 | * be within the limit. |
294 | * be within the limit. |
296 | */ |
295 | */ |
297 | unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; |
296 | unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; |
Line -... | Line 297... | ||
- | 297 | ||
298 | 298 | #ifdef CONFIG_X86_32 |
|
299 | /* |
299 | /* |
300 | * Space for the temporary SYSENTER stack: |
300 | * Space for the temporary SYSENTER stack. |
- | 301 | */ |
|
301 | */ |
302 | unsigned long SYSENTER_stack_canary; |
- | 303 | unsigned long SYSENTER_stack[64]; |
|
Line 302... | Line 304... | ||
302 | unsigned long SYSENTER_stack[64]; |
304 | #endif |
Line 303... | Line 305... | ||
303 | 305 | ||
Line 658... | Line 660... | ||
658 | * It's not worth to care about 3dnow prefetches for the K6 |
660 | * It's not worth to care about 3dnow prefetches for the K6 |
659 | * because they are microcoded there and very slow. |
661 | * because they are microcoded there and very slow. |
660 | */ |
662 | */ |
661 | static inline void prefetch(const void *x) |
663 | static inline void prefetch(const void *x) |
662 | { |
664 | { |
663 | alternative_input(BASE_PREFETCH, |
665 | alternative_input(BASE_PREFETCH, "prefetchnta %P1", |
664 | "prefetchnta (%1)", |
- | |
665 | X86_FEATURE_XMM, |
666 | X86_FEATURE_XMM, |
666 | "r" (x)); |
667 | "m" (*(const char *)x)); |
667 | } |
668 | } |
Line 668... | Line 669... | ||
668 | 669 | ||
669 | /* |
670 | /* |
670 | * 3dnow prefetch to get an exclusive cache line. |
671 | * 3dnow prefetch to get an exclusive cache line. |
671 | * Useful for spinlocks to avoid one state transition in the |
672 | * Useful for spinlocks to avoid one state transition in the |
672 | * cache coherency protocol: |
673 | * cache coherency protocol: |
673 | */ |
674 | */ |
674 | static inline void prefetchw(const void *x) |
675 | static inline void prefetchw(const void *x) |
675 | { |
676 | { |
676 | alternative_input(BASE_PREFETCH, |
- | |
677 | "prefetchw (%1)", |
677 | alternative_input(BASE_PREFETCH, "prefetchw %P1", |
678 | X86_FEATURE_3DNOW, |
678 | X86_FEATURE_3DNOWPREFETCH, |
679 | "r" (x)); |
679 | "m" (*(const char *)x)); |
Line 680... | Line 680... | ||
680 | } |
680 | } |
681 | 681 | ||
682 | static inline void spin_lock_prefetch(const void *x) |
682 | static inline void spin_lock_prefetch(const void *x) |
Line 755... | Line 755... | ||
755 | 755 | ||
756 | /* |
756 | /* |
757 | * Return saved PC of a blocked thread. |
757 | * Return saved PC of a blocked thread. |
758 | * What is this good for? it will be always the scheduler or ret_from_fork. |
758 | * What is this good for? it will be always the scheduler or ret_from_fork. |
759 | */ |
759 | */ |
Line 760... | Line 760... | ||
760 | #define thread_saved_pc(t) (*(unsigned long *)((t)->thread.sp - 8)) |
760 | #define thread_saved_pc(t) READ_ONCE_NOCHECK(*(unsigned long *)((t)->thread.sp - 8)) |
761 | 761 | ||
Line 762... | Line 762... | ||
762 | #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.sp0 - 1) |
762 | #define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.sp0 - 1) |