Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-05-04 Thread Joerg Roedel
On Tue, Apr 14, 2015 at 08:36:43PM +0200, Borislav Petkov wrote: > 64MB out of how much? Does it even matter? > > You could turn off CONFIG_GART_IOMMU and not build aperture_64.c at all. > > I think then you'll fall back to swiotlb or whatever and that will most > likely slow down DMA ... the

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-05-04 Thread Joerg Roedel
On Tue, Apr 14, 2015 at 08:36:43PM +0200, Borislav Petkov wrote: 64MB out of how much? Does it even matter? You could turn off CONFIG_GART_IOMMU and not build aperture_64.c at all. I think then you'll fall back to swiotlb or whatever and that will most likely slow down DMA ... the story

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-14 Thread Borislav Petkov
On Tue, Apr 14, 2015 at 08:22:48PM +0200, Jörg-Volker Peetz wrote: > thank you for the explanation. Somehow I thought I had a newer CPU w/o > GART registers, but I misread the patch. Maybe wishful thinking, in > the hope to save 64 MB :-( 64MB out of how much? Does it even matter? You could turn

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-14 Thread Jörg-Volker Peetz
Hi, Borislav Petkov wrote on 04/14/2015 13:33: > On Tue, Apr 14, 2015 at 01:15:43PM +0200, Jörg-Volker Peetz wrote: >> Hi, > > Hi, > > please do not top-post. > >> tried this patch on my HP Pavilion notebook wiht AMD Phenom II processor. The >> BIOS has no IOMMU option. >> With this patch I'm

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-14 Thread Borislav Petkov
On Tue, Apr 14, 2015 at 01:15:43PM +0200, Jörg-Volker Peetz wrote: > Hi, Hi, please do not top-post. > tried this patch on my HP Pavilion notebook wiht AMD Phenom II processor. The > BIOS has no IOMMU option. > With this patch I'm still seeing the AGP messages mention in the patch >

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-14 Thread Jörg-Volker Peetz
Hi, tried this patch on my HP Pavilion notebook wiht AMD Phenom II processor. The BIOS has no IOMMU option. With this patch I'm still seeing the AGP messages mention in the patch description. Is this processor affected at all? /proc/cpuinfo says "cpu family" 16. That is 10h? Regards, jvp.

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-14 Thread Jörg-Volker Peetz
Hi, tried this patch on my HP Pavilion notebook wiht AMD Phenom II processor. The BIOS has no IOMMU option. With this patch I'm still seeing the AGP messages mention in the patch description. Is this processor affected at all? /proc/cpuinfo says cpu family 16. That is 10h? Regards, jvp.

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-14 Thread Borislav Petkov
On Tue, Apr 14, 2015 at 01:15:43PM +0200, Jörg-Volker Peetz wrote: Hi, Hi, please do not top-post. tried this patch on my HP Pavilion notebook wiht AMD Phenom II processor. The BIOS has no IOMMU option. With this patch I'm still seeing the AGP messages mention in the patch description.

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-14 Thread Jörg-Volker Peetz
Hi, Borislav Petkov wrote on 04/14/2015 13:33: On Tue, Apr 14, 2015 at 01:15:43PM +0200, Jörg-Volker Peetz wrote: Hi, Hi, please do not top-post. tried this patch on my HP Pavilion notebook wiht AMD Phenom II processor. The BIOS has no IOMMU option. With this patch I'm still seeing

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-14 Thread Borislav Petkov
On Tue, Apr 14, 2015 at 08:22:48PM +0200, Jörg-Volker Peetz wrote: thank you for the explanation. Somehow I thought I had a newer CPU w/o GART registers, but I misread the patch. Maybe wishful thinking, in the hope to save 64 MB :-( 64MB out of how much? Does it even matter? You could turn

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-08 Thread Borislav Petkov
On Tue, Apr 07, 2015 at 03:34:19PM -0500, Aravind Gopalakrishnan wrote: > On 4/7/2015 9:57 AM, Borislav Petkov wrote: > >On Tue, Apr 07, 2015 at 09:46:26AM -0500, Aravind Gopalakrishnan wrote: > >>Okay. I'll do that and correct the typos Ingo pointed out earlier and > >>resend. > >Btw, I think you

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-08 Thread Borislav Petkov
On Tue, Apr 07, 2015 at 03:34:19PM -0500, Aravind Gopalakrishnan wrote: On 4/7/2015 9:57 AM, Borislav Petkov wrote: On Tue, Apr 07, 2015 at 09:46:26AM -0500, Aravind Gopalakrishnan wrote: Okay. I'll do that and correct the typos Ingo pointed out earlier and resend. Btw, I think you should do

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-07 Thread Aravind Gopalakrishnan
On 4/7/2015 9:57 AM, Borislav Petkov wrote: On Tue, Apr 07, 2015 at 09:46:26AM -0500, Aravind Gopalakrishnan wrote: Okay. I'll do that and correct the typos Ingo pointed out earlier and resend. Btw, I think you should do the same in early_gart_iommu_check() too. Doing the testing this way

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-07 Thread Aravind Gopalakrishnan
On 4/7/2015 7:34 AM, Borislav Petkov wrote: On Mon, Apr 06, 2015 at 06:10:22PM -0500, Aravind Gopalakrishnan wrote: So what happens if !early_pci_allowed() but the GART is present? We'll set amd_northbridges.flags |= AMD_NB_GART, but won't run any of the setup code in aperture_64.c, right? Is

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-07 Thread Borislav Petkov
On Tue, Apr 07, 2015 at 09:46:26AM -0500, Aravind Gopalakrishnan wrote: > Okay. I'll do that and correct the typos Ingo pointed out earlier and > resend. Btw, I think you should do the same in early_gart_iommu_check() too. Doing the testing this way would mean that we first are testing for GART

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-07 Thread Borislav Petkov
On Mon, Apr 06, 2015 at 06:10:22PM -0500, Aravind Gopalakrishnan wrote: > >So what happens if !early_pci_allowed() but the GART is present? We'll > >set amd_northbridges.flags |= AMD_NB_GART, but won't run any of the > >setup code in aperture_64.c, right? Is that a valid setup? > > It might be a

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-07 Thread Borislav Petkov
On Mon, Apr 06, 2015 at 06:10:22PM -0500, Aravind Gopalakrishnan wrote: So what happens if !early_pci_allowed() but the GART is present? We'll set amd_northbridges.flags |= AMD_NB_GART, but won't run any of the setup code in aperture_64.c, right? Is that a valid setup? It might be a valid

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-07 Thread Aravind Gopalakrishnan
On 4/7/2015 7:34 AM, Borislav Petkov wrote: On Mon, Apr 06, 2015 at 06:10:22PM -0500, Aravind Gopalakrishnan wrote: So what happens if !early_pci_allowed() but the GART is present? We'll set amd_northbridges.flags |= AMD_NB_GART, but won't run any of the setup code in aperture_64.c, right? Is

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-07 Thread Borislav Petkov
On Tue, Apr 07, 2015 at 09:46:26AM -0500, Aravind Gopalakrishnan wrote: Okay. I'll do that and correct the typos Ingo pointed out earlier and resend. Btw, I think you should do the same in early_gart_iommu_check() too. Doing the testing this way would mean that we first are testing for GART hw

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-07 Thread Aravind Gopalakrishnan
On 4/7/2015 9:57 AM, Borislav Petkov wrote: On Tue, Apr 07, 2015 at 09:46:26AM -0500, Aravind Gopalakrishnan wrote: Okay. I'll do that and correct the typos Ingo pointed out earlier and resend. Btw, I think you should do the same in early_gart_iommu_check() too. Doing the testing this way

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-06 Thread Aravind Gopalakrishnan
On 4/2/2015 1:19 PM, Ingo Molnar wrote: + if (amd_gart_present()) amd_northbridges.flags |= AMD_NB_GART; /* diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 76164e173a24..1cb170b06853 100644 --- a/arch/x86/kernel/aperture_64.c +++

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-06 Thread Aravind Gopalakrishnan
On 4/2/2015 1:19 PM, Ingo Molnar wrote: + if (amd_gart_present()) amd_northbridges.flags |= AMD_NB_GART; /* diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 76164e173a24..1cb170b06853 100644 --- a/arch/x86/kernel/aperture_64.c +++

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Ingo Molnar
* Borislav Petkov wrote: > On Thu, Apr 02, 2015 at 12:04:21PM -0500, Aravind Gopalakrishnan wrote: > > >No need - I can amend the local copy I have here. > > Here's what I did: > > --- > From: Aravind Gopalakrishnan > Date: Wed, 1 Apr 2015 09:32:08 -0500 > Subject: [PATCH] x86/gart: Check

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Aravind Gopalakrishnan
On 4/2/2015 11:53 AM, Borislav Petkov wrote: On Thu, Apr 02, 2015 at 11:23:17AM -0500, Aravind Gopalakrishnan wrote: Sure, will do that and resend. No need - I can amend the local copy I have here. Okay. Thanks! -Aravind. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Borislav Petkov
On Thu, Apr 02, 2015 at 12:04:21PM -0500, Aravind Gopalakrishnan wrote: > >No need - I can amend the local copy I have here. Here's what I did: --- From: Aravind Gopalakrishnan Date: Wed, 1 Apr 2015 09:32:08 -0500 Subject: [PATCH] x86/gart: Check for GART support before accessing GART

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Borislav Petkov
On Thu, Apr 02, 2015 at 11:23:17AM -0500, Aravind Gopalakrishnan wrote: > Sure, will do that and resend. No need - I can amend the local copy I have here. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Aravind Gopalakrishnan
On 4/2/2015 11:06 AM, Ingo Molnar wrote: We get "AGP:" messages on kernel logs like this- [0.00] AGP: Node 0: aperture [bus addr 0x-0x01ff] (32MB) [0.00] AGP: Your BIOS doesn't leave a aperture memory hole [0.00] AGP: Please enable the IOMMU option in the

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Ingo Molnar
* Aravind Gopalakrishnan wrote: > On 4/2/2015 5:01 AM, Ingo Molnar wrote: > >* Aravind Gopalakrishnan wrote: > > > >>GART registers are not present in newer processors (Fam15h, Model 10h > >>and later). So, avoid accesses to GART registers in PCI config > >>space by returning early in

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Aravind Gopalakrishnan
On 4/2/2015 5:01 AM, Ingo Molnar wrote: * Aravind Gopalakrishnan wrote: GART registers are not present in newer processors (Fam15h, Model 10h and later). So, avoid accesses to GART registers in PCI config space by returning early in early_gart_iommu_check() and gart_iommu_hole_init() if GART

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Ingo Molnar
* Aravind Gopalakrishnan wrote: > GART registers are not present in newer processors (Fam15h, Model 10h > and later). So, avoid accesses to GART registers in PCI config > space by returning early in early_gart_iommu_check() and > gart_iommu_hole_init() if GART is not available. In what fashion

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Borislav Petkov
On Wed, Apr 01, 2015 at 09:32:08AM -0500, Aravind Gopalakrishnan wrote: > GART registers are not present in newer processors (Fam15h, Model 10h > and later). So, avoid accesses to GART registers in PCI config > space by returning early in early_gart_iommu_check() and > gart_iommu_hole_init() if

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Borislav Petkov
On Wed, Apr 01, 2015 at 09:32:08AM -0500, Aravind Gopalakrishnan wrote: GART registers are not present in newer processors (Fam15h, Model 10h and later). So, avoid accesses to GART registers in PCI config space by returning early in early_gart_iommu_check() and gart_iommu_hole_init() if GART

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Ingo Molnar
* Aravind Gopalakrishnan aravind.gopalakrish...@amd.com wrote: GART registers are not present in newer processors (Fam15h, Model 10h and later). So, avoid accesses to GART registers in PCI config space by returning early in early_gart_iommu_check() and gart_iommu_hole_init() if GART is not

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Ingo Molnar
* Aravind Gopalakrishnan aravind.gopalakrish...@amd.com wrote: On 4/2/2015 5:01 AM, Ingo Molnar wrote: * Aravind Gopalakrishnan aravind.gopalakrish...@amd.com wrote: GART registers are not present in newer processors (Fam15h, Model 10h and later). So, avoid accesses to GART registers in

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Aravind Gopalakrishnan
On 4/2/2015 5:01 AM, Ingo Molnar wrote: * Aravind Gopalakrishnan aravind.gopalakrish...@amd.com wrote: GART registers are not present in newer processors (Fam15h, Model 10h and later). So, avoid accesses to GART registers in PCI config space by returning early in early_gart_iommu_check() and

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Aravind Gopalakrishnan
On 4/2/2015 11:06 AM, Ingo Molnar wrote: We get AGP: messages on kernel logs like this- [0.00] AGP: Node 0: aperture [bus addr 0x-0x01ff] (32MB) [0.00] AGP: Your BIOS doesn't leave a aperture memory hole [0.00] AGP: Please enable the IOMMU option in the BIOS

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Borislav Petkov
On Thu, Apr 02, 2015 at 11:23:17AM -0500, Aravind Gopalakrishnan wrote: Sure, will do that and resend. No need - I can amend the local copy I have here. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Borislav Petkov
On Thu, Apr 02, 2015 at 12:04:21PM -0500, Aravind Gopalakrishnan wrote: No need - I can amend the local copy I have here. Here's what I did: --- From: Aravind Gopalakrishnan aravind.gopalakrish...@amd.com Date: Wed, 1 Apr 2015 09:32:08 -0500 Subject: [PATCH] x86/gart: Check for GART support

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Aravind Gopalakrishnan
On 4/2/2015 11:53 AM, Borislav Petkov wrote: On Thu, Apr 02, 2015 at 11:23:17AM -0500, Aravind Gopalakrishnan wrote: Sure, will do that and resend. No need - I can amend the local copy I have here. Okay. Thanks! -Aravind. -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-02 Thread Ingo Molnar
* Borislav Petkov b...@suse.de wrote: On Thu, Apr 02, 2015 at 12:04:21PM -0500, Aravind Gopalakrishnan wrote: No need - I can amend the local copy I have here. Here's what I did: --- From: Aravind Gopalakrishnan aravind.gopalakrish...@amd.com Date: Wed, 1 Apr 2015 09:32:08 -0500

[PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-01 Thread Aravind Gopalakrishnan
GART registers are not present in newer processors (Fam15h, Model 10h and later). So, avoid accesses to GART registers in PCI config space by returning early in early_gart_iommu_check() and gart_iommu_hole_init() if GART is not available. Refactoring the family check used in amd_nb into an inline

[PATCH] x86, aperture: Check for GART before accessing GART registers

2015-04-01 Thread Aravind Gopalakrishnan
GART registers are not present in newer processors (Fam15h, Model 10h and later). So, avoid accesses to GART registers in PCI config space by returning early in early_gart_iommu_check() and gart_iommu_hole_init() if GART is not available. Refactoring the family check used in amd_nb into an inline