From: Matthew Wilcox <willy@debian.org>
To: linux-ia64@vger.kernel.org
Subject: Re: Latest 2.4 IA64 Baseline (Bjorn) + Latest ACPI testing report
Date: Thu, 18 Dec 2003 12:14:56 +0000 [thread overview]
Message-ID: <marc-linux-ia64-107174972219098@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106863619315583@msgid-missing>
On Thu, Dec 18, 2003 at 10:42:04AM +0800, Yu, Luming wrote:
> >No, you don't understand how resources work. When device drivers request
> >them, they're marked as busy. When busses claim them, they're marked
> >as not-busy.
>
> I didn't find the busy flag for resources you mentioned is being used
> in request_resource function.
That's right, it's used in request_region().
> Actually, based on whether there is a resource conflict happened,
> request_resource determine whether return -EBUSY . (2.6/kernel/resources.c)
request_resource() is used when you know what the parent resource is.
It's assumed to be not-busy; all it's checking for are existing children
of the parent resource which would conflict.
> According to comments of code, insert_resource is equivalent of request_resource when no conflict happens. If a conflict happens, and the
> conflicting resources entirely fit within the range of the new resource, then the new resource is inserted and the conflicting resources become
> childs of the new resource.
Yes, I wrote that comment ;-)
> Obviously, if device drivers want to consume some resources, then they cannot use insert_resource, because insert_resource will not report conflict.
Right, device drivers wouldn't use either request_resource or insert_resource.
They're used by the bus drivers which know a lot more about the system
topology than device drivers (which in general do not care).
> To anyone using request_resource to consume some resources, how to handle
> conflict situation? If this conflict is between resources supplier (BUS
> device) and resources consumer (Device ) , then device driver should ignore
> this conflict, because it's not a true conflict.
Drivers never see a conflict because they use request_region() which handles
the resource hierarchy for them.
Look at the patch I sent earlier in the thread. We change the bus driver
to call insert_resource; we don't change the vga driver at all.
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
prev parent reply other threads:[~2003-12-18 12:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-12 11:22 Latest 2.4 IA64 Baseline (Bjorn) + Latest ACPI testing report Yu, Luming
2003-11-19 13:08 ` Yu, Luming
2003-11-20 0:33 ` Bjorn Helgaas
2003-11-20 3:28 ` Matthew Wilcox
2003-11-20 17:09 ` Bjorn Helgaas
2003-11-20 17:29 ` Luck, Tony
2003-12-10 10:29 ` Yu, Luming
2003-12-11 0:34 ` Bjorn Helgaas
2003-12-11 19:32 ` Bjorn Helgaas
2003-12-16 9:37 ` Yu, Luming
2003-12-16 12:17 ` Matthew Wilcox
2003-12-16 16:23 ` Bjorn Helgaas
2003-12-17 2:54 ` Yu, Luming
2003-12-17 3:07 ` Yu, Luming
2003-12-17 12:23 ` Matthew Wilcox
2003-12-18 2:42 ` Yu, Luming
2003-12-18 12:14 ` Matthew Wilcox [this message]
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=marc-linux-ia64-107174972219098@msgid-missing \
--to=willy@debian.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.