diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/io.h | 4 | ||||
-rw-r--r-- | include/asm-ia64/pal.h | 11 | ||||
-rw-r--r-- | include/asm-s390/pgtable.h | 50 | ||||
-rw-r--r-- | include/asm-s390/unistd.h | 3 | ||||
-rw-r--r-- | include/linux/pci.h | 4 | ||||
-rw-r--r-- | include/linux/pci_hotplug.h | 236 |
6 files changed, 285 insertions, 23 deletions
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index 43bfff6c6b87..855c30af72a9 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h | |||
@@ -417,6 +417,8 @@ __writeq (unsigned long val, volatile void __iomem *addr) | |||
417 | # define outl_p outl | 417 | # define outl_p outl |
418 | #endif | 418 | #endif |
419 | 419 | ||
420 | # ifdef __KERNEL__ | ||
421 | |||
420 | extern void __iomem * ioremap(unsigned long offset, unsigned long size); | 422 | extern void __iomem * ioremap(unsigned long offset, unsigned long size); |
421 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); | 423 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); |
422 | 424 | ||
@@ -430,8 +432,6 @@ iounmap (volatile void __iomem *addr) | |||
430 | #define dmi_iounmap(x,l) iounmap(x) | 432 | #define dmi_iounmap(x,l) iounmap(x) |
431 | #define dmi_alloc(l) kmalloc(l, GFP_ATOMIC) | 433 | #define dmi_alloc(l) kmalloc(l, GFP_ATOMIC) |
432 | 434 | ||
433 | # ifdef __KERNEL__ | ||
434 | |||
435 | /* | 435 | /* |
436 | * String version of IO memory access ops: | 436 | * String version of IO memory access ops: |
437 | */ | 437 | */ |
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 2c8fd92d0ece..4283ddcc25fb 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -764,7 +764,7 @@ struct ia64_pal_retval { | |||
764 | * (generally 0) MUST be passed. Reserved parameters are not optional | 764 | * (generally 0) MUST be passed. Reserved parameters are not optional |
765 | * parameters. | 765 | * parameters. |
766 | */ | 766 | */ |
767 | extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64, u64); | 767 | extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64); |
768 | extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64); | 768 | extern struct ia64_pal_retval ia64_pal_call_stacked (u64, u64, u64, u64); |
769 | extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64); | 769 | extern struct ia64_pal_retval ia64_pal_call_phys_static (u64, u64, u64, u64); |
770 | extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64); | 770 | extern struct ia64_pal_retval ia64_pal_call_phys_stacked (u64, u64, u64, u64); |
@@ -774,14 +774,7 @@ extern void ia64_load_scratch_fpregs (struct ia64_fpreg *); | |||
774 | #define PAL_CALL(iprv,a0,a1,a2,a3) do { \ | 774 | #define PAL_CALL(iprv,a0,a1,a2,a3) do { \ |
775 | struct ia64_fpreg fr[6]; \ | 775 | struct ia64_fpreg fr[6]; \ |
776 | ia64_save_scratch_fpregs(fr); \ | 776 | ia64_save_scratch_fpregs(fr); \ |
777 | iprv = ia64_pal_call_static(a0, a1, a2, a3, 0); \ | 777 | iprv = ia64_pal_call_static(a0, a1, a2, a3); \ |
778 | ia64_load_scratch_fpregs(fr); \ | ||
779 | } while (0) | ||
780 | |||
781 | #define PAL_CALL_IC_OFF(iprv,a0,a1,a2,a3) do { \ | ||
782 | struct ia64_fpreg fr[6]; \ | ||
783 | ia64_save_scratch_fpregs(fr); \ | ||
784 | iprv = ia64_pal_call_static(a0, a1, a2, a3, 1); \ | ||
785 | ia64_load_scratch_fpregs(fr); \ | 778 | ia64_load_scratch_fpregs(fr); \ |
786 | } while (0) | 779 | } while (0) |
787 | 780 | ||
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 519f0a5ff181..36bb6dacf008 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -200,18 +200,45 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
200 | */ | 200 | */ |
201 | 201 | ||
202 | /* Hardware bits in the page table entry */ | 202 | /* Hardware bits in the page table entry */ |
203 | #define _PAGE_RO 0x200 /* HW read-only */ | 203 | #define _PAGE_RO 0x200 /* HW read-only bit */ |
204 | #define _PAGE_INVALID 0x400 /* HW invalid */ | 204 | #define _PAGE_INVALID 0x400 /* HW invalid bit */ |
205 | #define _PAGE_SWT 0x001 /* SW pte type bit t */ | ||
206 | #define _PAGE_SWX 0x002 /* SW pte type bit x */ | ||
205 | 207 | ||
206 | /* Mask and six different types of pages. */ | 208 | /* Six different types of pages. */ |
207 | #define _PAGE_TYPE_MASK 0x601 | ||
208 | #define _PAGE_TYPE_EMPTY 0x400 | 209 | #define _PAGE_TYPE_EMPTY 0x400 |
209 | #define _PAGE_TYPE_NONE 0x401 | 210 | #define _PAGE_TYPE_NONE 0x401 |
210 | #define _PAGE_TYPE_SWAP 0x600 | 211 | #define _PAGE_TYPE_SWAP 0x403 |
211 | #define _PAGE_TYPE_FILE 0x601 | 212 | #define _PAGE_TYPE_FILE 0x601 /* bit 0x002 is used for offset !! */ |
212 | #define _PAGE_TYPE_RO 0x200 | 213 | #define _PAGE_TYPE_RO 0x200 |
213 | #define _PAGE_TYPE_RW 0x000 | 214 | #define _PAGE_TYPE_RW 0x000 |
214 | 215 | ||
216 | /* | ||
217 | * PTE type bits are rather complicated. handle_pte_fault uses pte_present, | ||
218 | * pte_none and pte_file to find out the pte type WITHOUT holding the page | ||
219 | * table lock. ptep_clear_flush on the other hand uses ptep_clear_flush to | ||
220 | * invalidate a given pte. ipte sets the hw invalid bit and clears all tlbs | ||
221 | * for the page. The page table entry is set to _PAGE_TYPE_EMPTY afterwards. | ||
222 | * This change is done while holding the lock, but the intermediate step | ||
223 | * of a previously valid pte with the hw invalid bit set can be observed by | ||
224 | * handle_pte_fault. That makes it necessary that all valid pte types with | ||
225 | * the hw invalid bit set must be distinguishable from the four pte types | ||
226 | * empty, none, swap and file. | ||
227 | * | ||
228 | * irxt ipte irxt | ||
229 | * _PAGE_TYPE_EMPTY 1000 -> 1000 | ||
230 | * _PAGE_TYPE_NONE 1001 -> 1001 | ||
231 | * _PAGE_TYPE_SWAP 1011 -> 1011 | ||
232 | * _PAGE_TYPE_FILE 11?1 -> 11?1 | ||
233 | * _PAGE_TYPE_RO 0100 -> 1100 | ||
234 | * _PAGE_TYPE_RW 0000 -> 1000 | ||
235 | * | ||
236 | * pte_none is true for bits combinations 1000, 1100 | ||
237 | * pte_present is true for bits combinations 0000, 0010, 0100, 0110, 1001 | ||
238 | * pte_file is true for bits combinations 1101, 1111 | ||
239 | * swap pte is 1011 and 0001, 0011, 0101, 0111, 1010 and 1110 are invalid. | ||
240 | */ | ||
241 | |||
215 | #ifndef __s390x__ | 242 | #ifndef __s390x__ |
216 | 243 | ||
217 | /* Bits in the segment table entry */ | 244 | /* Bits in the segment table entry */ |
@@ -365,18 +392,21 @@ static inline int pmd_bad(pmd_t pmd) | |||
365 | 392 | ||
366 | static inline int pte_none(pte_t pte) | 393 | static inline int pte_none(pte_t pte) |
367 | { | 394 | { |
368 | return (pte_val(pte) & _PAGE_TYPE_MASK) == _PAGE_TYPE_EMPTY; | 395 | return (pte_val(pte) & _PAGE_INVALID) && !(pte_val(pte) & _PAGE_SWT); |
369 | } | 396 | } |
370 | 397 | ||
371 | static inline int pte_present(pte_t pte) | 398 | static inline int pte_present(pte_t pte) |
372 | { | 399 | { |
373 | return !(pte_val(pte) & _PAGE_INVALID) || | 400 | unsigned long mask = _PAGE_RO | _PAGE_INVALID | _PAGE_SWT | _PAGE_SWX; |
374 | (pte_val(pte) & _PAGE_TYPE_MASK) == _PAGE_TYPE_NONE; | 401 | return (pte_val(pte) & mask) == _PAGE_TYPE_NONE || |
402 | (!(pte_val(pte) & _PAGE_INVALID) && | ||
403 | !(pte_val(pte) & _PAGE_SWT)); | ||
375 | } | 404 | } |
376 | 405 | ||
377 | static inline int pte_file(pte_t pte) | 406 | static inline int pte_file(pte_t pte) |
378 | { | 407 | { |
379 | return (pte_val(pte) & _PAGE_TYPE_MASK) == _PAGE_TYPE_FILE; | 408 | unsigned long mask = _PAGE_RO | _PAGE_INVALID | _PAGE_SWT; |
409 | return (pte_val(pte) & mask) == _PAGE_TYPE_FILE; | ||
380 | } | 410 | } |
381 | 411 | ||
382 | #define pte_same(a,b) (pte_val(a) == pte_val(b)) | 412 | #define pte_same(a,b) (pte_val(a) == pte_val(b)) |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index a19238cbcffa..71d3c21b84f0 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -249,8 +249,9 @@ | |||
249 | #define __NR_vmsplice 309 | 249 | #define __NR_vmsplice 309 |
250 | /* Number 310 is reserved for new sys_move_pages */ | 250 | /* Number 310 is reserved for new sys_move_pages */ |
251 | #define __NR_getcpu 311 | 251 | #define __NR_getcpu 311 |
252 | #define __NR_epoll_pwait 312 | ||
252 | 253 | ||
253 | #define NR_syscalls 312 | 254 | #define NR_syscalls 313 |
254 | 255 | ||
255 | /* | 256 | /* |
256 | * There are some system calls that are not present on 64 bit, some | 257 | * There are some system calls that are not present on 64 bit, some |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 5c604f5fad67..4689e2a699c0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -443,6 +443,7 @@ extern void pci_remove_bus(struct pci_bus *b); | |||
443 | extern void pci_remove_bus_device(struct pci_dev *dev); | 443 | extern void pci_remove_bus_device(struct pci_dev *dev); |
444 | extern void pci_stop_bus_device(struct pci_dev *dev); | 444 | extern void pci_stop_bus_device(struct pci_dev *dev); |
445 | void pci_setup_cardbus(struct pci_bus *bus); | 445 | void pci_setup_cardbus(struct pci_bus *bus); |
446 | extern void pci_sort_breadthfirst(void); | ||
446 | 447 | ||
447 | /* Generic PCI functions exported to card drivers */ | 448 | /* Generic PCI functions exported to card drivers */ |
448 | 449 | ||
@@ -452,13 +453,14 @@ struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | |||
452 | int pci_find_capability (struct pci_dev *dev, int cap); | 453 | int pci_find_capability (struct pci_dev *dev, int cap); |
453 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 454 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
454 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 455 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
455 | struct pci_bus * pci_find_next_bus(const struct pci_bus *from); | 456 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); |
456 | 457 | ||
457 | struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); | 458 | struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); |
458 | struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, | 459 | struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, |
459 | unsigned int ss_vendor, unsigned int ss_device, | 460 | unsigned int ss_vendor, unsigned int ss_device, |
460 | struct pci_dev *from); | 461 | struct pci_dev *from); |
461 | struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn); | 462 | struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn); |
463 | struct pci_dev *pci_get_bus_and_slot (unsigned int bus, unsigned int devfn); | ||
462 | struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from); | 464 | struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from); |
463 | int pci_dev_present(const struct pci_device_id *ids); | 465 | int pci_dev_present(const struct pci_device_id *ids); |
464 | 466 | ||
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h new file mode 100644 index 000000000000..a675a05c4091 --- /dev/null +++ b/include/linux/pci_hotplug.h | |||
@@ -0,0 +1,236 @@ | |||
1 | /* | ||
2 | * PCI HotPlug Core Functions | ||
3 | * | ||
4 | * Copyright (C) 1995,2001 Compaq Computer Corporation | ||
5 | * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com) | ||
6 | * Copyright (C) 2001 IBM Corp. | ||
7 | * | ||
8 | * All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or (at | ||
13 | * your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, but | ||
16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
18 | * NON INFRINGEMENT. See the GNU General Public License for more | ||
19 | * details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | * | ||
25 | * Send feedback to <kristen.c.accardi@intel.com> | ||
26 | * | ||
27 | */ | ||
28 | #ifndef _PCI_HOTPLUG_H | ||
29 | #define _PCI_HOTPLUG_H | ||
30 | |||
31 | |||
32 | /* These values come from the PCI Hotplug Spec */ | ||
33 | enum pci_bus_speed { | ||
34 | PCI_SPEED_33MHz = 0x00, | ||
35 | PCI_SPEED_66MHz = 0x01, | ||
36 | PCI_SPEED_66MHz_PCIX = 0x02, | ||
37 | PCI_SPEED_100MHz_PCIX = 0x03, | ||
38 | PCI_SPEED_133MHz_PCIX = 0x04, | ||
39 | PCI_SPEED_66MHz_PCIX_ECC = 0x05, | ||
40 | PCI_SPEED_100MHz_PCIX_ECC = 0x06, | ||
41 | PCI_SPEED_133MHz_PCIX_ECC = 0x07, | ||
42 | PCI_SPEED_66MHz_PCIX_266 = 0x09, | ||
43 | PCI_SPEED_100MHz_PCIX_266 = 0x0a, | ||
44 | PCI_SPEED_133MHz_PCIX_266 = 0x0b, | ||
45 | PCI_SPEED_66MHz_PCIX_533 = 0x11, | ||
46 | PCI_SPEED_100MHz_PCIX_533 = 0x12, | ||
47 | PCI_SPEED_133MHz_PCIX_533 = 0x13, | ||
48 | PCI_SPEED_UNKNOWN = 0xff, | ||
49 | }; | ||
50 | |||
51 | /* These values come from the PCI Express Spec */ | ||
52 | enum pcie_link_width { | ||
53 | PCIE_LNK_WIDTH_RESRV = 0x00, | ||
54 | PCIE_LNK_X1 = 0x01, | ||
55 | PCIE_LNK_X2 = 0x02, | ||
56 | PCIE_LNK_X4 = 0x04, | ||
57 | PCIE_LNK_X8 = 0x08, | ||
58 | PCIE_LNK_X12 = 0x0C, | ||
59 | PCIE_LNK_X16 = 0x10, | ||
60 | PCIE_LNK_X32 = 0x20, | ||
61 | PCIE_LNK_WIDTH_UNKNOWN = 0xFF, | ||
62 | }; | ||
63 | |||
64 | enum pcie_link_speed { | ||
65 | PCIE_2PT5GB = 0x14, | ||
66 | PCIE_LNK_SPEED_UNKNOWN = 0xFF, | ||
67 | }; | ||
68 | |||
69 | struct hotplug_slot; | ||
70 | struct hotplug_slot_attribute { | ||
71 | struct attribute attr; | ||
72 | ssize_t (*show)(struct hotplug_slot *, char *); | ||
73 | ssize_t (*store)(struct hotplug_slot *, const char *, size_t); | ||
74 | }; | ||
75 | #define to_hotplug_attr(n) container_of(n, struct hotplug_slot_attribute, attr); | ||
76 | |||
77 | /** | ||
78 | * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use | ||
79 | * @owner: The module owner of this structure | ||
80 | * @enable_slot: Called when the user wants to enable a specific pci slot | ||
81 | * @disable_slot: Called when the user wants to disable a specific pci slot | ||
82 | * @set_attention_status: Called to set the specific slot's attention LED to | ||
83 | * the specified value | ||
84 | * @hardware_test: Called to run a specified hardware test on the specified | ||
85 | * slot. | ||
86 | * @get_power_status: Called to get the current power status of a slot. | ||
87 | * If this field is NULL, the value passed in the struct hotplug_slot_info | ||
88 | * will be used when this value is requested by a user. | ||
89 | * @get_attention_status: Called to get the current attention status of a slot. | ||
90 | * If this field is NULL, the value passed in the struct hotplug_slot_info | ||
91 | * will be used when this value is requested by a user. | ||
92 | * @get_latch_status: Called to get the current latch status of a slot. | ||
93 | * If this field is NULL, the value passed in the struct hotplug_slot_info | ||
94 | * will be used when this value is requested by a user. | ||
95 | * @get_adapter_status: Called to get see if an adapter is present in the slot or not. | ||
96 | * If this field is NULL, the value passed in the struct hotplug_slot_info | ||
97 | * will be used when this value is requested by a user. | ||
98 | * @get_address: Called to get pci address of a slot. | ||
99 | * If this field is NULL, the value passed in the struct hotplug_slot_info | ||
100 | * will be used when this value is requested by a user. | ||
101 | * @get_max_bus_speed: Called to get the max bus speed for a slot. | ||
102 | * If this field is NULL, the value passed in the struct hotplug_slot_info | ||
103 | * will be used when this value is requested by a user. | ||
104 | * @get_cur_bus_speed: Called to get the current bus speed for a slot. | ||
105 | * If this field is NULL, the value passed in the struct hotplug_slot_info | ||
106 | * will be used when this value is requested by a user. | ||
107 | * | ||
108 | * The table of function pointers that is passed to the hotplug pci core by a | ||
109 | * hotplug pci driver. These functions are called by the hotplug pci core when | ||
110 | * the user wants to do something to a specific slot (query it for information, | ||
111 | * set an LED, enable / disable power, etc.) | ||
112 | */ | ||
113 | struct hotplug_slot_ops { | ||
114 | struct module *owner; | ||
115 | int (*enable_slot) (struct hotplug_slot *slot); | ||
116 | int (*disable_slot) (struct hotplug_slot *slot); | ||
117 | int (*set_attention_status) (struct hotplug_slot *slot, u8 value); | ||
118 | int (*hardware_test) (struct hotplug_slot *slot, u32 value); | ||
119 | int (*get_power_status) (struct hotplug_slot *slot, u8 *value); | ||
120 | int (*get_attention_status) (struct hotplug_slot *slot, u8 *value); | ||
121 | int (*get_latch_status) (struct hotplug_slot *slot, u8 *value); | ||
122 | int (*get_adapter_status) (struct hotplug_slot *slot, u8 *value); | ||
123 | int (*get_address) (struct hotplug_slot *slot, u32 *value); | ||
124 | int (*get_max_bus_speed) (struct hotplug_slot *slot, enum pci_bus_speed *value); | ||
125 | int (*get_cur_bus_speed) (struct hotplug_slot *slot, enum pci_bus_speed *value); | ||
126 | }; | ||
127 | |||
128 | /** | ||
129 | * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot | ||
130 | * @power: if power is enabled or not (1/0) | ||
131 | * @attention_status: if the attention light is enabled or not (1/0) | ||
132 | * @latch_status: if the latch (if any) is open or closed (1/0) | ||
133 | * @adapter_present: if there is a pci board present in the slot or not (1/0) | ||
134 | * @address: (domain << 16 | bus << 8 | dev) | ||
135 | * | ||
136 | * Used to notify the hotplug pci core of the status of a specific slot. | ||
137 | */ | ||
138 | struct hotplug_slot_info { | ||
139 | u8 power_status; | ||
140 | u8 attention_status; | ||
141 | u8 latch_status; | ||
142 | u8 adapter_status; | ||
143 | u32 address; | ||
144 | enum pci_bus_speed max_bus_speed; | ||
145 | enum pci_bus_speed cur_bus_speed; | ||
146 | }; | ||
147 | |||
148 | /** | ||
149 | * struct hotplug_slot - used to register a physical slot with the hotplug pci core | ||
150 | * @name: the name of the slot being registered. This string must | ||
151 | * be unique amoung slots registered on this system. | ||
152 | * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot | ||
153 | * @info: pointer to the &struct hotplug_slot_info for the initial values for | ||
154 | * this slot. | ||
155 | * @release: called during pci_hp_deregister to free memory allocated in a | ||
156 | * hotplug_slot structure. | ||
157 | * @private: used by the hotplug pci controller driver to store whatever it | ||
158 | * needs. | ||
159 | */ | ||
160 | struct hotplug_slot { | ||
161 | char *name; | ||
162 | struct hotplug_slot_ops *ops; | ||
163 | struct hotplug_slot_info *info; | ||
164 | void (*release) (struct hotplug_slot *slot); | ||
165 | void *private; | ||
166 | |||
167 | /* Variables below this are for use only by the hotplug pci core. */ | ||
168 | struct list_head slot_list; | ||
169 | struct kobject kobj; | ||
170 | }; | ||
171 | #define to_hotplug_slot(n) container_of(n, struct hotplug_slot, kobj) | ||
172 | |||
173 | extern int pci_hp_register (struct hotplug_slot *slot); | ||
174 | extern int pci_hp_deregister (struct hotplug_slot *slot); | ||
175 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | ||
176 | struct hotplug_slot_info *info); | ||
177 | extern struct subsystem pci_hotplug_slots_subsys; | ||
178 | |||
179 | /* PCI Setting Record (Type 0) */ | ||
180 | struct hpp_type0 { | ||
181 | u32 revision; | ||
182 | u8 cache_line_size; | ||
183 | u8 latency_timer; | ||
184 | u8 enable_serr; | ||
185 | u8 enable_perr; | ||
186 | }; | ||
187 | |||
188 | /* PCI-X Setting Record (Type 1) */ | ||
189 | struct hpp_type1 { | ||
190 | u32 revision; | ||
191 | u8 max_mem_read; | ||
192 | u8 avg_max_split; | ||
193 | u16 tot_max_split; | ||
194 | }; | ||
195 | |||
196 | /* PCI Express Setting Record (Type 2) */ | ||
197 | struct hpp_type2 { | ||
198 | u32 revision; | ||
199 | u32 unc_err_mask_and; | ||
200 | u32 unc_err_mask_or; | ||
201 | u32 unc_err_sever_and; | ||
202 | u32 unc_err_sever_or; | ||
203 | u32 cor_err_mask_and; | ||
204 | u32 cor_err_mask_or; | ||
205 | u32 adv_err_cap_and; | ||
206 | u32 adv_err_cap_or; | ||
207 | u16 pci_exp_devctl_and; | ||
208 | u16 pci_exp_devctl_or; | ||
209 | u16 pci_exp_lnkctl_and; | ||
210 | u16 pci_exp_lnkctl_or; | ||
211 | u32 sec_unc_err_sever_and; | ||
212 | u32 sec_unc_err_sever_or; | ||
213 | u32 sec_unc_err_mask_and; | ||
214 | u32 sec_unc_err_mask_or; | ||
215 | }; | ||
216 | |||
217 | struct hotplug_params { | ||
218 | struct hpp_type0 *t0; /* Type0: NULL if not available */ | ||
219 | struct hpp_type1 *t1; /* Type1: NULL if not available */ | ||
220 | struct hpp_type2 *t2; /* Type2: NULL if not available */ | ||
221 | struct hpp_type0 type0_data; | ||
222 | struct hpp_type1 type1_data; | ||
223 | struct hpp_type2 type2_data; | ||
224 | }; | ||
225 | |||
226 | #ifdef CONFIG_ACPI | ||
227 | #include <acpi/acpi.h> | ||
228 | #include <acpi/acpi_bus.h> | ||
229 | #include <acpi/actypes.h> | ||
230 | extern acpi_status acpi_run_oshp(acpi_handle handle); | ||
231 | extern acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, | ||
232 | struct hotplug_params *hpp); | ||
233 | int acpi_root_bridge(acpi_handle handle); | ||
234 | #endif | ||
235 | #endif | ||
236 | |||