linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Linux ACPI mailing list <linux-acpi@vger.kernel.org>,
	Intel E/100 mailing list <e1000-devel@lists.sourceforge.net>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: 2.6.24-rc8-mm1
Date: Fri, 18 Jan 2008 04:34:03 +0530	[thread overview]
Message-ID: <20080117230403.GA5411@balbir.in.ibm.com> (raw)
In-Reply-To: <924EFEDD5F540B4284297C4DC59F3DEE5E909A@orsmsx423.amr.corp.intel.com>

* Pallipadi, Venkatesh <venkatesh.pallipadi@intel.com> [2008-01-17 11:22:19]:

> 
> 
> >-----Original Message-----
> >From: Andrew Morton [mailto:akpm@linux-foundation.org] 
> >Sent: Thursday, January 17, 2008 10:40 AM
> >To: balbir@linux.vnet.ibm.com
> >Cc: linux-kernel@vger.kernel.org; Linux ACPI mailing list; 
> >Intel E/100 mailing list; Ingo Molnar; Thomas Gleixner; 
> >Pallipadi, Venkatesh
> >Subject: Re: 2.6.24-rc8-mm1
> >
> >On Thu, 17 Jan 2008 18:16:22 +0530 Balbir Singh 
> ><balbir@linux.vnet.ibm.com> wrote:
> >
> >> * Andrew Morton <akpm@linux-foundation.org> [2008-01-17 02:35:14]:
> >> 
> >> > 
> >> > 
> >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2
> >.6.24-rc8/2.6.24-rc8-mm1/
> >> > 
> >> > - selinux is busted on one of my two selinux-enabled test machines.
> >> > 
> >> > - suspend-to-ram and suspend-to-disk are totally hosed on 
> >one of my test
> >> >   machines.  I guess I get to bisect this.
> >> > 
> >> > - git-nfsd is dropped due to conflicts with git-nfs
> >> > 
> >> > - git-newsetup is dropped due to conflicts with git-x86 (I think)
> >> > 
> >> > - git-perfmon is dropped due to conflicts with git-x86 (I think)
> >> > 
> >> > - git-kgdb is dropped due to conflicts with 
> >git-damn-near-everything
> >> > 
> >> > - git-block is dropped due to conflicts with the IDE tree
> >> > 
> >> > - kvm probably doesn't work properly because I couldn't be 
> >bothered fixing
> >> >   the conflicts between git-kvm and the driver tree
> >> > 
> >> > - the volume of rejects and build errors which are caused 
> >by subsystem
> >> >   maintainers fiddling with other people's stuff is quite 
> >out of control. 
> >> >   Something needs to happen here.
> >> 
> >> Hi, Andrew,
> >> 
> >> May be it was one of the conflicts, but my system fails to get
> >> ethernet working with this version. I see
> >> 
> >> e100: Intel(R) PRO/100 Network Driver, 3. 5.23-k4-NAPI
> >> e100: Copyright(c) 1999-2006 Intel Corporation
> >> ACPI: PCI Interrupt 0000:04:08.0[A] -> GSI 20 (level, low) -> IRQ 20
> >> modprobe:2584 conflicting cache attribute 50000000-50001000
> >> uncached<->default
> >> e100: 0000:04:08.0: e100_probe: Cannot map device registers, 
> >aborting.
> >> ACPI: PCI interrupt for device 0000:04:08.0 disabled
> >> e100: probe of 0000:04:08.0 failed with error -12
> >> 
> >It appears that the new PAT code didn't like e100's 
> >pci_iomap().  Venki, can you
> >take a look please?
> >
> 
> This seems similar to one problem we saw yday. May not be specific to
> e1000. May be at some generic pci code.
> 
> The problem is
> >> modprobe:2584 conflicting cache attribute 50000000-50001000
> >> uncached<->default
> 
> Some address range here is being mapped with conflicting types.
> Somewhere the range was mapped with default (write-back). Later
> pci_iomap() is mapping that region as uncacheable which is basically
> aliasing. PAT code detects the aliasing and fails the second uncacheable
> request which leads in the failure.
> 
> We are trying to find who exactly is mapping this with default at the
> beginning.
> Balbir: Full dmesg with debug boot parameter may help.
>

Venki/Andrew,

I think I found the root cause of the problem and a fix for it. 
The fix works for me.

Description
-----------

With the introduction of reserve_mattr() and free_mattr(), the ioremap* routines
started exploiting it. The recent 2.6.24-rc8-mm1 kernel has a peculiar problem
where in, certain devices disappear. In my case for example

e100: Intel(R) PRO/100 Network Driver, 3. 5.23-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
ACPI: PCI Interrupt 0000:04:08.0[A] -> GSI 20 (level, low) -> IRQ 20
modprobe:2584 conflicting cache attribute 50000000-50001000 uncached<->default
e100: 0000:04:08.0: e100_probe: Cannot map device registers, aborting.
ACPI: PCI interrupt for device 0000:04:08.0 disabled

On further analysis, it was discovered that quirk_e100_interrupt() calls
ioremap(), which reserves memory attributes for the e100 card, but iounmap()
does not free it. The patch below removes the check fixes this problem.
It removes for the check of (p->flags >> 20), which checks for architecture
specific bits set on the vm_struct's flags member. ioremap() unconditionally
reserves memory attributes, iounmap() should undo it.


Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
---

 arch/x86/mm/ioremap_32.c |    2 +-
 arch/x86/mm/ioremap_64.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/x86/mm/ioremap_32.c~fix-mattr-issue arch/x86/mm/ioremap_32.c
--- linux-2.6.24-rc8/arch/x86/mm/ioremap_32.c~fix-mattr-issue	2008-01-18 04:25:33.000000000 +0530
+++ linux-2.6.24-rc8-balbir/arch/x86/mm/ioremap_32.c	2008-01-18 04:25:53.000000000 +0530
@@ -220,7 +220,7 @@ void iounmap(volatile void __iomem *addr
 	}
 
 	/* Reset the direct mapping. Can block */
-	if (p->flags >> 20) {
+	if (p->flags) {
 		free_mattr(p->phys_addr, p->phys_addr + get_vm_area_size(p),
 		           p->flags>>20);
 		ioremap_change_attr(p->phys_addr, get_vm_area_size(p), 0);
diff -puN arch/x86/mm/ioremap_64.c~fix-mattr-issue arch/x86/mm/ioremap_64.c
--- linux-2.6.24-rc8/arch/x86/mm/ioremap_64.c~fix-mattr-issue	2008-01-18 04:25:33.000000000 +0530
+++ linux-2.6.24-rc8-balbir/arch/x86/mm/ioremap_64.c	2008-01-18 04:25:53.000000000 +0530
@@ -191,7 +191,7 @@ void iounmap(volatile void __iomem *addr
 	}
 
 	/* Reset the direct mapping. Can block */
-	if (p->flags >> 20) {
+	if (p->flags) {
 		free_mattr(p->phys_addr, p->phys_addr + get_vm_area_size(p),
 		           p->flags>>20);
 		ioremap_change_attr(p->phys_addr, get_vm_area_size(p), 0);
_
 
-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

  parent reply	other threads:[~2008-01-17 23:04 UTC|newest]

Thread overview: 132+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 10:35 2.6.24-rc8-mm1 Andrew Morton
2008-01-17 12:41 ` 2.6.24-rc8-mm1 Build Failure on S390x Kamalesh Babulal
2008-01-17 14:05   ` Martin Schwidefsky
2008-01-17 12:46 ` 2.6.24-rc8-mm1 Balbir Singh
2008-01-17 18:40   ` 2.6.24-rc8-mm1 Andrew Morton
2008-01-17 19:22     ` 2.6.24-rc8-mm1 Pallipadi, Venkatesh
2008-01-17 19:40       ` 2.6.24-rc8-mm1 Andrew Morton
2008-01-17 19:47         ` [E1000-devel] 2.6.24-rc8-mm1 Brandeburg, Jesse
2008-01-17 23:33         ` 2.6.24-rc8-mm1 Venki Pallipadi
2008-01-17 23:04       ` Balbir Singh [this message]
2008-01-18  1:42         ` 2.6.24-rc8-mm1 Siddha, Suresh B
2008-01-18  5:06           ` 2.6.24-rc8-mm1 Balbir Singh
2008-01-17 20:25     ` 2.6.24-rc8-mm1 Balbir Singh
2008-01-17 13:21 ` [-mm Patch] UML: fix a building error WANG Cong
2008-01-17 17:59   ` Jeff Dike
2008-01-17 13:34 ` 2.6.24-rc8-mm1 Kamalesh Babulal
2008-01-17 14:26   ` 2.6.24-rc8-mm1 Ingo Molnar
2008-01-17 13:54 ` 2.6.24-rc8-mm1 kernel panic while bootup Kamalesh Babulal
2008-01-17 18:54   ` Andrew Morton
2008-01-17 19:00     ` Randy Dunlap
2008-01-20  6:24     ` Kamalesh Babulal
2008-01-20  7:17       ` Andrew Morton
2008-01-17 13:56 ` [-mm Patch] uml: fix a building error WANG Cong
2008-01-17 17:59   ` Jeff Dike
2008-01-17 18:11   ` Mariusz Kozlowski
2008-01-17 18:56     ` Andrew Morton
2008-01-17 19:38       ` Pallipadi, Venkatesh
2008-01-17 19:44         ` Andrew Morton
2008-01-17 20:42         ` Mariusz Kozlowski
2008-01-17 21:14         ` Jeff Dike
2008-01-17 21:41           ` Venki Pallipadi
2008-01-17 23:08             ` Jeff Dike
2008-01-17 23:17               ` Pallipadi, Venkatesh
2008-01-18  2:19                 ` Jeff Dike
2008-01-17 18:56     ` Jeff Dike
2008-01-17 15:23 ` do_md_run returned -22 [Was: 2.6.24-rc8-mm1] Jiri Slaby
2008-01-17 19:01   ` Andrew Morton
2008-01-17 23:15     ` Neil Brown
2008-01-17 16:15 ` 2.6.24-rc8-mm1 Build Failure on scsi driver Kamalesh Babulal
2008-01-17 19:11   ` Andrew Morton
2008-01-18  0:53     ` [PATCH] aha152x: fix isa/pcmcia compile problem Tejun Heo
2008-01-18  6:29       ` Kamalesh Babulal
2008-01-18  6:37     ` 2.6.24-rc8-mm1 Build Failure on scsi driver Kamalesh Babulal
2008-01-18  7:20       ` [PATCH] SCSI: fix isa/pcmcia compile problem Tejun Heo
2008-01-18  7:30         ` Kamalesh Babulal
2008-01-18 14:58         ` James Bottomley
2008-01-18 23:27           ` Tejun Heo
2008-01-18 23:28             ` Tejun Heo
2008-01-18 23:32             ` James Bottomley
2008-01-18 23:46               ` Tejun Heo
2008-01-18 23:47               ` James Bottomley
2008-01-18 23:54                 ` Tejun Heo
2008-01-21  9:56         ` Christoph Hellwig
2008-01-21 14:59           ` James Bottomley
2008-01-18  7:27       ` 2.6.24-rc8-mm1 Build Failure on scsi driver Andrew Morton
2008-01-17 16:48 ` 2.6.24-rc8-mm1 (BUG: sched_rt) Randy Dunlap
2008-01-17 17:11   ` Peter Zijlstra
2008-01-17 18:05     ` Randy Dunlap
2008-01-17 19:14     ` Randy Dunlap
2008-01-17 19:38       ` Andrew Morton
2008-01-17 17:15   ` Peter Zijlstra
2008-01-17 17:28 ` x86 refuses to build [Re: 2.6.24-rc8-mm1] Dhaval Giani
2008-01-17 18:44   ` Dhaval Giani
2008-01-18  8:59     ` Ingo Molnar
2008-01-18 16:16       ` Mike Travis
2008-01-17 18:13 ` 2.6.24-rc8-mm1: broken suspend Rafael J. Wysocki
2008-01-17 18:18 ` 2.6.24-rc8-mm1: powerpc: include/asm/nvram.h:62: error: field 'partition' has incomplete type Mariusz Kozlowski
2008-01-17 19:27   ` Andrew Morton
2008-01-17 19:06 ` 2.6.24-rc8-mm1 powerpc build errors Olof Johansson
2008-01-17 19:35   ` Andrew Morton
2008-01-17 22:00     ` Greg KH
2008-01-17 21:10 ` 2.6.24-rc8-mm1 Matt Mackall
2008-01-18  1:29   ` 2.6.24-rc8-mm1 Matt Mackall
2008-01-18  5:08     ` 2.6.24-rc8-mm1 Andrew Morton
2008-01-18 13:55       ` 2.6.24-rc8-mm1 Matt Mackall
2008-01-17 21:29 ` 2.6.24-rc8-mm1 - mkubootimg wants <zlib.h> Joseph Fannin
2008-01-17 22:21   ` Josh Boyer
2008-01-17 22:15 ` 2.6.24-rc8-mm1: powerpc oopses Mariusz Kozlowski
2008-01-17 22:51   ` Andrew Morton
2008-01-17 23:39     ` Matt Mackall
2008-01-18  0:05       ` Andrew Morton
2008-01-18  0:12         ` Matt Mackall
2008-01-18  0:29           ` Andrew Morton
2008-01-18  0:47             ` Matt Mackall
2008-01-18  1:07               ` Andrew Morton
2008-01-18  1:16                 ` Matt Mackall
2008-01-18 17:23               ` Mariusz Kozlowski
2008-01-18 17:33                 ` Matt Mackall
2008-01-18  6:14 ` 2.6.24-rc8-mm1 Build Failure at scripts/mkubooting/crc32.c Kamalesh Babulal
2008-01-18  8:06   ` Sam Ravnborg
2008-01-20 15:30   ` Mel Gorman
2008-01-18  7:09 ` 2.6.24-rc8-mm1 build failure on headers_check Kamalesh Babulal
2008-01-18  7:38   ` Andrew Morton
2008-01-18  8:36 ` 2.6.24-rc8-mm1 Kernel oops will running kernbench Kamalesh Babulal
2008-01-18  8:44   ` Andrew Morton
2008-01-18  9:01     ` Paul Mackerras
2008-01-18  9:34       ` Kamalesh Babulal
2008-01-18 10:19         ` Paul Mackerras
2008-01-18 10:26         ` Paul Mackerras
2008-01-18 10:44           ` Kamalesh Babulal
2008-01-18 10:54             ` Balbir Singh
2008-01-25  6:05           ` 2.6.24 Kernel oops will running kernbench regression from 2.6.24-rc8-mm1 Kamalesh Babulal
2008-01-18 13:34 ` 2.6.24-rc8-mm1: broken suspend (due to git-cpufreq.patch) Rafael J. Wysocki
2008-01-18 16:53   ` Dave Jones
2008-01-18 17:10   ` Dave Jones
2008-01-18 20:50     ` Rafael J. Wysocki
2008-01-18 21:55       ` Rafael J. Wysocki
2008-01-18 17:26 ` 2.6.24-rc8-mm1 (KVM build issues) Balbir Singh
2008-01-22  8:40   ` Andrew Morton
2008-01-18 18:06 ` 2.6.24-rc8-mm1 Kyle McMartin
2008-01-20  1:10 ` 2.6.24-rc8-mm1: WARN_ON() in clockevents_register_device() on HP nx6325 Rafael J. Wysocki
2008-01-20 10:24   ` Ingo Molnar
2008-01-20 11:21     ` Rafael J. Wysocki
2008-01-20 16:31 ` 2.6.24-rc8-mm1 Mel Gorman
2008-01-20 16:35   ` 2.6.24-rc8-mm1 Balbir Singh
2008-01-20 18:24     ` 2.6.24-rc8-mm1 Mel Gorman
2008-01-21 18:31 ` 2.6.24-rc8-mm1 - SELinux issues Valdis.Kletnieks
2008-01-21 18:53 ` [PATCH} 2.6.24-rc8-mm1 - x86_64 PAT issues with vesafb and NVidia cards Valdis.Kletnieks
2008-01-22 20:30 ` 2.6.24-rc8-mm1: sparc64 warning at fs/file_table.c:49 __fput+0x1a8/0x1e0() Mariusz Kozlowski
2008-01-22 21:02   ` Andrew Morton
2008-01-22 22:28     ` Dave Hansen
2008-01-22 23:13     ` Dave Hansen
2008-01-23  5:47       ` Christoph Hellwig
2008-02-01 23:34       ` Andrew Morton
2008-01-24  6:09 ` 2.6.24-rc8-mm1 Kernel oops on CIFS while running fsstress Kamalesh Babulal
2008-01-24  6:44 ` 2.6.24-rc8-mm1 Badness at net/ipv4/tcp_input.c:2506 Kamalesh Babulal
2008-01-25  0:04 ` 2.6.24-rc8-mm1: old sparc64 bug Mariusz Kozlowski
2008-01-25 17:11   ` Takashi Iwai
2008-01-25 18:34     ` Mariusz Kozlowski
2008-01-28 11:55       ` Takashi Iwai
2008-01-28 22:13         ` Mariusz Kozlowski
2008-01-25 21:59 ` 2.6.24-rc8-mm1 Torsten Kaiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080117230403.GA5411@balbir.in.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).