From: Matthew Wilcox <matthew-Ztpu424NOJ8@public.gmane.org>
To: Matthew Wilcox <matthew-Ztpu424NOJ8@public.gmane.org>
Cc: "Yu, Luming" <luming.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"Brown, Len" <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
"Fu,
Michael" <michael.fu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: Re: [PATCH] Teach OSL to handle multiple interrupts [1/2]
Date: Tue, 16 Nov 2004 18:46:51 +0000 [thread overview]
Message-ID: <20041116184651.GH1108@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20041116032218.GF1108-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/9Udqfwiw@public.gmane.org>
On Tue, Nov 16, 2004 at 03:22:18AM +0000, Matthew Wilcox wrote:
> > 1.1 Shouldn't it return AE_ERROR.
>
> I don't think it really matters. The driver will attach to these devices,
> but that doesn't do any harm.
>
> > 2.1 fadt seems always to be 0, So why you need it?
>
> fadt is only set to 0 when _CRS resources exist. ie for GPE blocks that
> aren't described in the FADT. We shouldn't unregister GPE blocks that're
> described in the FADT because we didn't register them in the first place.
>
> > 3.2 address.reserved must be 0. (You allocate it at stack)
>
> Doesn't really matter. It isn't used. But I'll fix that.
OK, here's an interdiff from the 0.2 to the 0.3 driver which fixes these
issues:
diff -u linux-2.6/drivers/acpi/gpe-block.c linux-2.6/drivers/acpi/gpe-block.c
--- linux-2.6/drivers/acpi/gpe-block.c 7 Nov 2004 14:34:33 -0000
+++ linux-2.6/drivers/acpi/gpe-block.c 16 Nov 2004 18:12:52 -0000
@@ -18,7 +18,7 @@
MODULE_AUTHOR("Matthew Wilcox <willy-VXdhtT5mjnY@public.gmane.org>");
MODULE_LICENSE("GPL");
-MODULE_VERSION("0.2");
+MODULE_VERSION("0.3");
#define NAME "gpe-block"
@@ -83,9 +83,6 @@
{
struct acpi_resource_address64 addr;
int size;
- int *fadt = context;
-
- *fadt = 0;
if (res->id != ACPI_RSTYPE_ADDRESS16 &&
res->id != ACPI_RSTYPE_ADDRESS32 &&
@@ -107,26 +104,24 @@
{
struct gpe_block block;
- block.register_count = 0;
+ memset(&block, 0, sizeof(block));
acpi_walk_resources(device->handle, METHOD_NAME__CRS,
acpi_gpe_block_crs_add, &block);
+
+ /* Decline to handle GPE blocks with no _CRS. */
if (block.register_count == 0)
- return 0;
+ return -ENODEV;
acpi_install_gpe_block(device->handle, &block.address,
block.register_count, block.interrupt_level);
- return AE_OK;
+ return 0;
}
static int acpi_gpe_block_remove(struct acpi_device *device, int type)
{
- int fadt = 1;
-
acpi_walk_resources(device->handle, METHOD_NAME__CRS,
- acpi_gpe_block_crs_remove, &fadt);
- if (fadt)
- return AE_OK;
+ acpi_gpe_block_crs_remove, NULL);
return acpi_remove_gpe_block(device->handle);
}
This driver still works, so if I don't get any more comments, I'll submit
the 0.3 driver for inclusion ...
--
"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
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
next prev parent reply other threads:[~2004-11-16 18:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-12 17:28 Re: [PATCH] Teach OSL to handle multiple interrupts [1/2] Yu, Luming
2004-11-16 3:22 ` Matthew Wilcox
[not found] ` <20041116032218.GF1108-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/9Udqfwiw@public.gmane.org>
2004-11-16 18:46 ` Matthew Wilcox [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-16 17:49 Yu, Luming
2004-11-16 17:57 Yu, Luming
2004-11-17 2:27 Yu, Luming
2004-11-17 20:49 ` Matthew Wilcox
2004-11-18 16:21 Yu, Luming
2004-11-18 16:41 Yu, Luming
2004-11-20 3:32 ` Matthew Wilcox
2004-11-21 17:08 Yu, Luming
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=20041116184651.GH1108@parcelfarce.linux.theplanet.co.uk \
--to=matthew-ztpu424noj8@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=luming.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=michael.fu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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