use MTRR for write combining if PAT is not available
Quoted 7 lines · Suresh Siddha
If we are going to make
ioremap()andset_memory_wc()add mtrr's in non-pat case, then we need to delete the added mtrr(s) in the correspondingiounmap()andset_memory_wb()aswell.hmm, this is becoming too complex. The way i915 and other graphics drivers are using
set_memory_wc(), it is def a bad idea to start adding mtrr's behind the back for non-pat case.
Yes, maybe it's better to drop it for ioremap() and set_memory_wc(). But I'd like to keep it for mmapping the PCI region. It should help all the people with PAT-incapable CPUs and graphics chips without DRM support (for them there simply is no driver that should set up the MTRR entries...).
Quoted 3 lines
Can't we just force PAT option always and we probably don't care about
ioremap_wc()on processors were PAT doesn't get enabled because of known errata.
I don't think this is a good idea, Robert Hancock wrote there may be millions of such Laptops (Core Solo/Duo erratum AE7, Pentium M erratum Y31) :
http://marc.info/?l=linux-kernel&m=125537136105246&w=2
Quoted 2 lines
or Perhaps just try to add mtrr only for the pci mmap case like the 4th patch in this series..
I'd prefer this! ;-)
Kind regards,
Thomas
Quoted 10 lines · Thomas Schlichter
I don't think this is a good idea, Robert Hancock wrote there may be millions of such Laptops (Core Solo/Duo erratum AE7, Pentium M erratum Y31) :
http://marc.info/?l=linux-kernel&m=125537136105246&w=2
Quoted 2 lines
or Perhaps just try to add mtrr only for the pci mmap case like the 4th patch in this series..
I'd prefer this! ;-)
Hm, we could perhaps do that - but i think we should only do that on systems that have PAT disabled.
Which brings up the question of how to properly QA such a narrow segment of the market. Maybe disabling CONFIG_X86_PAT should enable that logic too.
Ingo
Quoted 11 lines · Ingo Molnar
Quoted 9 lines · Thomas Schlichter
I don't think this is a good idea, Robert Hancock wrote there may be millions of such Laptops (Core Solo/Duo erratum AE7, Pentium M erratum Y31) :
http://marc.info/?l=linux-kernel&m=125537136105246&w=2
Quoted 2 lines
or Perhaps just try to add mtrr only for the pci mmap case like the 4th patch in this series..
Quoted 8 lines
Quoted 1 line
I'd prefer this! ;-)
Hm, we could perhaps do that - but i think we should only do that on systems that have PAT disabled.
Which brings up the question of how to properly QA such a narrow segment of the market. Maybe disabling
CONFIG_X86_PATshould enable that logic too.
Also, I think we can simplify and avoid mtrr_add_unaligned() and worry only about the pci mmap aligned cases etc. Those are the only interesting ones.
thanks,
suresh
Quoted 8 lines · Ingo Molnar
Quoted 4 lines · Thomas Schlichter
Quoted 2 lines
or Perhaps just try to add mtrr only for the pci mmap case like the 4th patch in this series..
I'd prefer this! ;-)
Hm, we could perhaps do that - but i think we should only do that on systems that have PAT disabled.
The patch I sent should do exactly that.
Quoted 3 lines
Which brings up the question of how to properly QA such a narrow segment of the market. Maybe disabling
CONFIG_X86_PATshould enable that logic too.
When CONFIG_X86_PAT is disabled, pat_enabled is 0, and thus my new code should be active. Or do I miss something?
What do you think about the latest version of my patch series I just sent?
Kind regards,
Thomas
Quoted 1 line · Thomas Schlichter
What do you think about the latest version of my patch series I just sent?
I think we can simplify this by just using mtrr_add_page() and avoid all the complexity that comes with mtrr_add_unaligned().
pci_mmap_range() should call one mtrr_add_page() if the base and size are nicely aligned. Almost all the cases, this is the usage sequence here anyway.
thanks,
suresh
Quoted 9 lines · Suresh Siddha
Quoted 1 line · Thomas Schlichter
What do you think about the latest version of my patch series I just sent?
I think we can simplify this by just using
mtrr_add_page()and avoid all the complexity that comes withmtrr_add_unaligned().
pci_mmap_range()should call onemtrr_add_page()if the base and size are nicely aligned. Almost all the cases, this is the usage sequence here anyway.
yep, keeping it simple is a must.
Ingo