diff options
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/eeh.h | 15 | ||||
-rw-r--r-- | include/asm-powerpc/eeh_event.h | 10 | ||||
-rw-r--r-- | include/asm-powerpc/io.h | 6 |
3 files changed, 8 insertions, 23 deletions
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index 868c7139dbff..2c3dc4a2b12a 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h | |||
@@ -293,8 +293,6 @@ static inline void eeh_memcpy_toio(volatile void __iomem *dest, const void *src, | |||
293 | static inline u8 eeh_inb(unsigned long port) | 293 | static inline u8 eeh_inb(unsigned long port) |
294 | { | 294 | { |
295 | u8 val; | 295 | u8 val; |
296 | if (!_IO_IS_VALID(port)) | ||
297 | return ~0; | ||
298 | val = in_8((u8 __iomem *)(port+pci_io_base)); | 296 | val = in_8((u8 __iomem *)(port+pci_io_base)); |
299 | if (EEH_POSSIBLE_ERROR(val, u8)) | 297 | if (EEH_POSSIBLE_ERROR(val, u8)) |
300 | return eeh_check_failure((void __iomem *)(port), val); | 298 | return eeh_check_failure((void __iomem *)(port), val); |
@@ -303,15 +301,12 @@ static inline u8 eeh_inb(unsigned long port) | |||
303 | 301 | ||
304 | static inline void eeh_outb(u8 val, unsigned long port) | 302 | static inline void eeh_outb(u8 val, unsigned long port) |
305 | { | 303 | { |
306 | if (_IO_IS_VALID(port)) | 304 | out_8((u8 __iomem *)(port+pci_io_base), val); |
307 | out_8((u8 __iomem *)(port+pci_io_base), val); | ||
308 | } | 305 | } |
309 | 306 | ||
310 | static inline u16 eeh_inw(unsigned long port) | 307 | static inline u16 eeh_inw(unsigned long port) |
311 | { | 308 | { |
312 | u16 val; | 309 | u16 val; |
313 | if (!_IO_IS_VALID(port)) | ||
314 | return ~0; | ||
315 | val = in_le16((u16 __iomem *)(port+pci_io_base)); | 310 | val = in_le16((u16 __iomem *)(port+pci_io_base)); |
316 | if (EEH_POSSIBLE_ERROR(val, u16)) | 311 | if (EEH_POSSIBLE_ERROR(val, u16)) |
317 | return eeh_check_failure((void __iomem *)(port), val); | 312 | return eeh_check_failure((void __iomem *)(port), val); |
@@ -320,15 +315,12 @@ static inline u16 eeh_inw(unsigned long port) | |||
320 | 315 | ||
321 | static inline void eeh_outw(u16 val, unsigned long port) | 316 | static inline void eeh_outw(u16 val, unsigned long port) |
322 | { | 317 | { |
323 | if (_IO_IS_VALID(port)) | 318 | out_le16((u16 __iomem *)(port+pci_io_base), val); |
324 | out_le16((u16 __iomem *)(port+pci_io_base), val); | ||
325 | } | 319 | } |
326 | 320 | ||
327 | static inline u32 eeh_inl(unsigned long port) | 321 | static inline u32 eeh_inl(unsigned long port) |
328 | { | 322 | { |
329 | u32 val; | 323 | u32 val; |
330 | if (!_IO_IS_VALID(port)) | ||
331 | return ~0; | ||
332 | val = in_le32((u32 __iomem *)(port+pci_io_base)); | 324 | val = in_le32((u32 __iomem *)(port+pci_io_base)); |
333 | if (EEH_POSSIBLE_ERROR(val, u32)) | 325 | if (EEH_POSSIBLE_ERROR(val, u32)) |
334 | return eeh_check_failure((void __iomem *)(port), val); | 326 | return eeh_check_failure((void __iomem *)(port), val); |
@@ -337,8 +329,7 @@ static inline u32 eeh_inl(unsigned long port) | |||
337 | 329 | ||
338 | static inline void eeh_outl(u32 val, unsigned long port) | 330 | static inline void eeh_outl(u32 val, unsigned long port) |
339 | { | 331 | { |
340 | if (_IO_IS_VALID(port)) | 332 | out_le32((u32 __iomem *)(port+pci_io_base), val); |
341 | out_le32((u32 __iomem *)(port+pci_io_base), val); | ||
342 | } | 333 | } |
343 | 334 | ||
344 | /* in-string eeh macros */ | 335 | /* in-string eeh macros */ |
diff --git a/include/asm-powerpc/eeh_event.h b/include/asm-powerpc/eeh_event.h index 93d55a2bebfd..dc6bf0ffb796 100644 --- a/include/asm-powerpc/eeh_event.h +++ b/include/asm-powerpc/eeh_event.h | |||
@@ -18,8 +18,8 @@ | |||
18 | * Copyright (c) 2005 Linas Vepstas <linas@linas.org> | 18 | * Copyright (c) 2005 Linas Vepstas <linas@linas.org> |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef ASM_PPC64_EEH_EVENT_H | 21 | #ifndef ASM_POWERPC_EEH_EVENT_H |
22 | #define ASM_PPC64_EEH_EVENT_H | 22 | #define ASM_POWERPC_EEH_EVENT_H |
23 | #ifdef __KERNEL__ | 23 | #ifdef __KERNEL__ |
24 | 24 | ||
25 | /** EEH event -- structure holding pci controller data that describes | 25 | /** EEH event -- structure holding pci controller data that describes |
@@ -39,7 +39,7 @@ struct eeh_event { | |||
39 | * @dev pci device | 39 | * @dev pci device |
40 | * | 40 | * |
41 | * This routine builds a PCI error event which will be delivered | 41 | * This routine builds a PCI error event which will be delivered |
42 | * to all listeners on the peh_notifier_chain. | 42 | * to all listeners on the eeh_notifier_chain. |
43 | * | 43 | * |
44 | * This routine can be called within an interrupt context; | 44 | * This routine can be called within an interrupt context; |
45 | * the actual event will be delivered in a normal context | 45 | * the actual event will be delivered in a normal context |
@@ -51,7 +51,7 @@ int eeh_send_failure_event (struct device_node *dn, | |||
51 | int time_unavail); | 51 | int time_unavail); |
52 | 52 | ||
53 | /* Main recovery function */ | 53 | /* Main recovery function */ |
54 | void handle_eeh_events (struct eeh_event *); | 54 | struct pci_dn * handle_eeh_events (struct eeh_event *); |
55 | 55 | ||
56 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
57 | #endif /* ASM_PPC64_EEH_EVENT_H */ | 57 | #endif /* ASM_POWERPC_EEH_EVENT_H */ |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 68efbea379c9..4840fbf89c32 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -37,12 +37,6 @@ | |||
37 | 37 | ||
38 | extern unsigned long isa_io_base; | 38 | extern unsigned long isa_io_base; |
39 | extern unsigned long pci_io_base; | 39 | extern unsigned long pci_io_base; |
40 | extern unsigned long io_page_mask; | ||
41 | |||
42 | #define MAX_ISA_PORT 0x10000 | ||
43 | |||
44 | #define _IO_IS_VALID(port) ((port) >= MAX_ISA_PORT || (1 << (port>>PAGE_SHIFT)) \ | ||
45 | & io_page_mask) | ||
46 | 40 | ||
47 | #ifdef CONFIG_PPC_ISERIES | 41 | #ifdef CONFIG_PPC_ISERIES |
48 | /* __raw_* accessors aren't supported on iSeries */ | 42 | /* __raw_* accessors aren't supported on iSeries */ |