diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 14:52:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 14:52:52 -0400 |
commit | 08acd4f8af42affd8cbed81cc1b69fa12ddb213f (patch) | |
tree | 988d15db6233b20db6a500cd5f590c6d2041462d /drivers/acpi/resources/rsirq.c | |
parent | ccf2779544eecfcc5447e2028d1029b6d4ff7bb6 (diff) | |
parent | 008238b54ac2350babf195084ecedbcf7851a202 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (179 commits)
ACPI: Fix acpi_processor_idle and idle= boot parameters interaction
acpi: fix section mismatch warning in pnpacpi
intel_menlo: fix build warning
ACPI: Cleanup: Remove unneeded, multiple local dummy variables
ACPI: video - fix permissions on some proc entries
ACPI: video - properly handle errors when registering proc elements
ACPI: video - do not store invalid entries in attached_array list
ACPI: re-name acpi_pm_ops to acpi_suspend_ops
ACER_WMI/ASUS_LAPTOP: fix build bug
thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed
ACPI: check a return value correctly in acpi_power_get_context()
#if 0 acpi/bay.c:eject_removable_drive()
eeepc-laptop: add hwmon fan control
eeepc-laptop: add backlight
eeepc-laptop: add base driver
ACPI: thinkpad-acpi: bump up version to 0.20
ACPI: thinkpad-acpi: fix selects in Kconfig
ACPI: thinkpad-acpi: use a private workqueue
ACPI: thinkpad-acpi: fluff really minor fix
ACPI: thinkpad-acpi: use uppercase for "LED" on user documentation
...
Fixed conflicts in drivers/acpi/video.c and drivers/misc/intel_menlow.c
manually.
Diffstat (limited to 'drivers/acpi/resources/rsirq.c')
-rw-r--r-- | drivers/acpi/resources/rsirq.c | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/drivers/acpi/resources/rsirq.c b/drivers/acpi/resources/rsirq.c index 5657f7b95039..a8805efc0366 100644 --- a/drivers/acpi/resources/rsirq.c +++ b/drivers/acpi/resources/rsirq.c | |||
@@ -5,7 +5,7 @@ | |||
5 | ******************************************************************************/ | 5 | ******************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2007, R. Byron Moore | 8 | * Copyright (C) 2000 - 2008, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -52,7 +52,7 @@ ACPI_MODULE_NAME("rsirq") | |||
52 | * acpi_rs_get_irq | 52 | * acpi_rs_get_irq |
53 | * | 53 | * |
54 | ******************************************************************************/ | 54 | ******************************************************************************/ |
55 | struct acpi_rsconvert_info acpi_rs_get_irq[7] = { | 55 | struct acpi_rsconvert_info acpi_rs_get_irq[8] = { |
56 | {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IRQ, | 56 | {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IRQ, |
57 | ACPI_RS_SIZE(struct acpi_resource_irq), | 57 | ACPI_RS_SIZE(struct acpi_resource_irq), |
58 | ACPI_RSC_TABLE_SIZE(acpi_rs_get_irq)}, | 58 | ACPI_RSC_TABLE_SIZE(acpi_rs_get_irq)}, |
@@ -69,6 +69,12 @@ struct acpi_rsconvert_info acpi_rs_get_irq[7] = { | |||
69 | ACPI_EDGE_SENSITIVE, | 69 | ACPI_EDGE_SENSITIVE, |
70 | 1}, | 70 | 1}, |
71 | 71 | ||
72 | /* Get the descriptor length (2 or 3 for IRQ descriptor) */ | ||
73 | |||
74 | {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.irq.descriptor_length), | ||
75 | AML_OFFSET(irq.descriptor_type), | ||
76 | 0}, | ||
77 | |||
72 | /* All done if no flag byte present in descriptor */ | 78 | /* All done if no flag byte present in descriptor */ |
73 | 79 | ||
74 | {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 3}, | 80 | {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 3}, |
@@ -94,7 +100,9 @@ struct acpi_rsconvert_info acpi_rs_get_irq[7] = { | |||
94 | * | 100 | * |
95 | ******************************************************************************/ | 101 | ******************************************************************************/ |
96 | 102 | ||
97 | struct acpi_rsconvert_info acpi_rs_set_irq[9] = { | 103 | struct acpi_rsconvert_info acpi_rs_set_irq[13] = { |
104 | /* Start with a default descriptor of length 3 */ | ||
105 | |||
98 | {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IRQ, | 106 | {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IRQ, |
99 | sizeof(struct aml_resource_irq), | 107 | sizeof(struct aml_resource_irq), |
100 | ACPI_RSC_TABLE_SIZE(acpi_rs_set_irq)}, | 108 | ACPI_RSC_TABLE_SIZE(acpi_rs_set_irq)}, |
@@ -105,7 +113,7 @@ struct acpi_rsconvert_info acpi_rs_set_irq[9] = { | |||
105 | AML_OFFSET(irq.irq_mask), | 113 | AML_OFFSET(irq.irq_mask), |
106 | ACPI_RS_OFFSET(data.irq.interrupt_count)}, | 114 | ACPI_RS_OFFSET(data.irq.interrupt_count)}, |
107 | 115 | ||
108 | /* Set the flags byte by default */ | 116 | /* Set the flags byte */ |
109 | 117 | ||
110 | {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering), | 118 | {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering), |
111 | AML_OFFSET(irq.flags), | 119 | AML_OFFSET(irq.flags), |
@@ -118,6 +126,33 @@ struct acpi_rsconvert_info acpi_rs_set_irq[9] = { | |||
118 | {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable), | 126 | {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable), |
119 | AML_OFFSET(irq.flags), | 127 | AML_OFFSET(irq.flags), |
120 | 4}, | 128 | 4}, |
129 | |||
130 | /* | ||
131 | * All done if the output descriptor length is required to be 3 | ||
132 | * (i.e., optimization to 2 bytes cannot be attempted) | ||
133 | */ | ||
134 | {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE, | ||
135 | ACPI_RS_OFFSET(data.irq.descriptor_length), | ||
136 | 3}, | ||
137 | |||
138 | /* Set length to 2 bytes (no flags byte) */ | ||
139 | |||
140 | {ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq_noflags)}, | ||
141 | |||
142 | /* | ||
143 | * All done if the output descriptor length is required to be 2. | ||
144 | * | ||
145 | * TBD: Perhaps we should check for error if input flags are not | ||
146 | * compatible with a 2-byte descriptor. | ||
147 | */ | ||
148 | {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE, | ||
149 | ACPI_RS_OFFSET(data.irq.descriptor_length), | ||
150 | 2}, | ||
151 | |||
152 | /* Reset length to 3 bytes (descriptor with flags byte) */ | ||
153 | |||
154 | {ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq)}, | ||
155 | |||
121 | /* | 156 | /* |
122 | * Check if the flags byte is necessary. Not needed if the flags are: | 157 | * Check if the flags byte is necessary. Not needed if the flags are: |
123 | * ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_HIGH, ACPI_EXCLUSIVE | 158 | * ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_HIGH, ACPI_EXCLUSIVE |
@@ -134,7 +169,7 @@ struct acpi_rsconvert_info acpi_rs_set_irq[9] = { | |||
134 | ACPI_RS_OFFSET(data.irq.sharable), | 169 | ACPI_RS_OFFSET(data.irq.sharable), |
135 | ACPI_EXCLUSIVE}, | 170 | ACPI_EXCLUSIVE}, |
136 | 171 | ||
137 | /* irq_no_flags() descriptor can be used */ | 172 | /* We can optimize to a 2-byte irq_no_flags() descriptor */ |
138 | 173 | ||
139 | {ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq_noflags)} | 174 | {ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq_noflags)} |
140 | }; | 175 | }; |