public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: /proc/ioports regression in 2.6.6 on Tiger4
Date: Thu, 13 May 2004 09:23:57 +0000	[thread overview]
Message-ID: <20040513.182357.104026513.maeda@jp.fujitsu.com> (raw)

Hi, 

Since 2.6.6, "cat /proc/ioports" loops infinity on Tiger4, because 
there is a loop in ioport_resource tree.

$ cat /proc/ioports 
00000000-00005fff : PCI Bus 0000:00
  00000060-0000006f : i8042
  000001f0-000001f7 : ide0
  000003c0-000003df : vga+
  000003f6-000003f6 : ide0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
          00000500-0000053f : 0000:00:1f.0
	  ... 

$ /sbin/lspci -vs 00:1f.0
00:1f.0 ISA bridge: Intel Corp. 82801DB LPC Interface Controller (rev 02)
        Flags: bus master, medium devsel, latency 0

0000:00:1f.0, which causes the loop, is an Intel LPC interface bridge,
and quirk_ich4_lpc_acpi() has become called for the bridge since 2.6.6.

The reason of the loop is, pci_claim_resource() is issued twice with
the exactly same resource structure, the first one is called by 
quirk_io_region() for quirk_ich4_lpc_acpi() at pci_fixup_device() and
the second one is called by pcibios_fixup_device_resources(), 
and in this condition, insert_resource() sets the resource's child pointer
to itself. Oviously, it causes the loop.

There are a few ways to fix the problem as following, but I'm not sure
which one is the best. 

1) Do not claim the resource in quirk_io_region().
2) Put additional check in pcibios_fixup_device_resources() if the resource
   has already been claimed.
3) Modify insert_resource() not to claim the resource that has already been
   claimed and return with -EBUSY.

Does anybody have comments?

Thanks,
Naoaki Maeda

             reply	other threads:[~2004-05-13  9:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-13  9:23 MAEDA Naoaki [this message]
2004-05-13 19:28 ` /proc/ioports regression in 2.6.6 on Tiger4 Chris McDermott
2004-05-14  1:23 ` MAEDA Naoaki
2004-05-24  2:54 ` MAEDA Naoaki
2004-05-27 18:45 ` David Mosberger
2004-05-28  4:06 ` Maeda Naoaki

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=20040513.182357.104026513.maeda@jp.fujitsu.com \
    --to=maeda.naoaki@jp.fujitsu.com \
    --cc=linux-ia64@vger.kernel.org \
    /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