Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1358134
| From | Toshi Kani <toshi.kani@hpe.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table |
| Date | 2016-03-15 17:20 +0100 |
| Message-ID | <rcZRo-4pd-11@gated-at.bofh.it> (permalink) |
| References | (6 earlier) <rcL22-2Nm-19@gated-at.bofh.it> <rcMKu-3W2-9@gated-at.bofh.it> <rcV1o-1e9-21@gated-at.bofh.it> <rcYBY-3qp-9@gated-at.bofh.it> <rcZom-3Yy-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2016-03-15 at 16:47 +0100, Borislav Petkov wrote: > On Tue, Mar 15, 2016 at 09:43:15AM -0600, Toshi Kani wrote: > > > Please use on init paths boot_cpu_has(X86_FEATURE_PAT) and on fast > > > paths static_cpu_has(X86_FEATURE_PAT). No more of that cpu_has_XXX > > > ugliness. > > > > 'cpu_has_pat' is defined as 'boot_cpu_has(X86_FEATURE_PAT)'. Do you > > mean it should explicitly use 'boot_cpu_has(X86_FEATURE_PAT)'? > > No, read what I said. > > We use boot_cpu_has(<feature_bit>) on slow paths (i.e., init, bootup, > etc), where speed is not that important. static_cpu_has(<feature_bit>) > is an optimized version which should be used in hot paths. Yes, I understand that part. Let me rephrase my question. This PAT code is on init paths and speed is not that important. So, it needs to use 'boot_cpu_has()' here. 'cpu_has_pat' is defined as boot_cpu_has(X86_FEATURE_PAT), and hence it uses boot_cpu_has() already. While cpu_has_pat is the same as boot_cpu_has(X86_FEATURE_PAT), cpu_has_XXX should not be used. So, this code needs to be changed to use boot_cpu_has(X86_FEATURE_PAT) directly. Is this right? Thanks, -Toshi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] Refactor MTRR and PAT initializations Toshi Kani <toshi.kani@hpe.com> - 2016-03-11 05:00 +0100
[PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani <toshi.kani@hpe.com> - 2016-03-11 05:00 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Borislav Petkov <bp@alien8.de> - 2016-03-11 10:20 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani <toshi.kani@hpe.com> - 2016-03-11 16:40 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Borislav Petkov <bp@alien8.de> - 2016-03-11 17:00 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani <toshi.kani@hpe.com> - 2016-03-11 19:40 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Borislav Petkov <bp@alien8.de> - 2016-03-12 13:00 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani <toshi.kani@hpe.com> - 2016-03-14 21:50 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Borislav Petkov <bp@alien8.de> - 2016-03-15 12:10 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani <toshi.kani@hpe.com> - 2016-03-15 22:10 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-03-15 01:30 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani <toshi.kani@hpe.com> - 2016-03-15 03:20 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Borislav Petkov <bp@alien8.de> - 2016-03-15 12:10 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani <toshi.kani@hpe.com> - 2016-03-15 16:00 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Borislav Petkov <bp@alien8.de> - 2016-03-15 16:50 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Toshi Kani <toshi.kani@hpe.com> - 2016-03-15 17:20 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Borislav Petkov <bp@alien8.de> - 2016-03-15 17:40 +0100
Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-03-15 22:40 +0100
[PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani <toshi.kani@hpe.com> - 2016-03-11 05:00 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Ingo Molnar <mingo@kernel.org> - 2016-03-11 10:10 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Ingo Molnar <mingo@kernel.org> - 2016-03-11 10:20 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani <toshi.kani@hpe.com> - 2016-03-11 18:50 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Ingo Molnar <mingo@kernel.org> - 2016-03-12 17:20 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani <toshi.kani@hpe.com> - 2016-03-14 20:00 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-03-15 00:00 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani <toshi.kani@hpe.com> - 2016-03-15 00:50 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Borislav Petkov <bp@suse.de> - 2016-03-15 17:00 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Borislav Petkov <bp@alien8.de> - 2016-03-11 10:30 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani <toshi.kani@hpe.com> - 2016-03-11 19:10 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-03-11 23:20 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani <toshi.kani@hpe.com> - 2016-03-12 00:10 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-03-12 00:40 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani <toshi.kani@hpe.com> - 2016-03-12 01:30 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-03-15 01:20 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Toshi Kani <toshi.kani@hpe.com> - 2016-03-16 00:00 +0100
Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-03-16 00:30 +0100
csiph-web