diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-12-08 01:57:30 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-12-08 01:57:30 -0800 |
| commit | 260aae1bd2459a166851ce3f886e2af5cf8f4175 (patch) | |
| tree | f34c643e84a74c332a15d6bbd6ef5f9ad85b850c /include | |
| parent | 036171f7a42c5177cf757021afe407827cc318c8 (diff) | |
| parent | ea3c96e3a9f40d626f243ed105d91fa00a0b85a3 (diff) | |
Merge http://ppc.bkbits.net/for-linus-ppc64
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc64/eeh.h | 106 | ||||
| -rw-r--r-- | include/asm-ppc64/errno.h | 8 | ||||
| -rw-r--r-- | include/asm-ppc64/hvcall.h | 1 | ||||
| -rw-r--r-- | include/asm-ppc64/iSeries/HvCall.h | 6 | ||||
| -rw-r--r-- | include/asm-ppc64/io.h | 106 | ||||
| -rw-r--r-- | include/asm-ppc64/page.h | 2 | ||||
| -rw-r--r-- | include/asm-ppc64/pci-bridge.h | 12 | ||||
| -rw-r--r-- | include/asm-ppc64/pci.h | 48 | ||||
| -rw-r--r-- | include/asm-ppc64/prom.h | 8 | ||||
| -rw-r--r-- | include/asm-ppc64/thread_info.h | 4 | ||||
| -rw-r--r-- | include/asm-ppc64/unistd.h | 1 |
11 files changed, 123 insertions, 179 deletions
diff --git a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h index 17f879db57bf..5b1cef3a3c3b 100644 --- a/include/asm-ppc64/eeh.h +++ b/include/asm-ppc64/eeh.h @@ -27,25 +27,26 @@ struct pci_dev; -#define IO_UNMAPPED_REGION_ID 0xaUL - -#define IO_TOKEN_TO_ADDR(token) ((((unsigned long)(token)) & 0xFFFFFFFF) | (0xEUL << 60)) -/* Flag bits encoded in the 3 unused function bits of devfn */ -#define EEH_TOKEN_DISABLED (1UL << 34UL) /* eeh is disabled for this token */ -#define IS_EEH_TOKEN_DISABLED(token) ((unsigned long)(token) & EEH_TOKEN_DISABLED) +/* I/O addresses are converted to EEH "tokens" such that a driver will cause + * a bad page fault if the address is used directly (i.e. these addresses are + * never actually mapped. Translation between IO <-> EEH region is 1 to 1. + */ +#define IO_TOKEN_TO_ADDR(token) (((unsigned long)(token) & ~(0xfUL << REGION_SHIFT)) | \ + (IO_REGION_ID << REGION_SHIFT)) +#define IO_ADDR_TO_TOKEN(addr) (((unsigned long)(addr) & ~(0xfUL << REGION_SHIFT)) | \ + (EEH_REGION_ID << REGION_SHIFT)) -#define EEH_STATE_OVERRIDE 1 /* IOA does not require eeh traps */ -#define EEH_STATE_FAILURE 16 /* */ +/* Values for eeh_mode bits in device_node */ +#define EEH_MODE_SUPPORTED (1<<0) +#define EEH_MODE_NOCHECK (1<<1) /* This is for profiling only */ extern unsigned long eeh_total_mmio_ffs; -extern int eeh_implemented; - void eeh_init(void); -static inline int is_eeh_implemented(void) { return eeh_implemented; } int eeh_get_state(unsigned long ea); unsigned long eeh_check_failure(void *token, unsigned long val); +void *eeh_ioremap(unsigned long addr, void *vaddr); #define EEH_DISABLE 0 #define EEH_ENABLE 1 @@ -58,15 +59,11 @@ int eeh_set_option(struct pci_dev *dev, int options); */ int is_eeh_configured(struct pci_dev *dev); -/* Generate an EEH token. - * The high nibble of the offset is cleared, otherwise bounds checking is performed. - * Use IO_TOKEN_TO_ADDR(token) to translate this token back to a mapped virtual addr. - * Do NOT do this to perform IO -- use the read/write macros! +/* Translate a (possible) eeh token to a physical addr. + * If "token" is not an eeh token it is simply returned under + * the assumption that it is already a physical addr. */ -unsigned long eeh_token(unsigned long phb, - unsigned long bus, - unsigned long devfn, - unsigned long offset); +unsigned long eeh_token_to_phys(unsigned long token); extern void *memcpy(void *, const void *, unsigned long); extern void *memset(void *,int, unsigned long); @@ -77,15 +74,16 @@ extern void *memset(void *,int, unsigned long); * If EEH is off for a device and it is a memory BAR, ioremap will * map it to the IOREGION. In this case addr == vaddr and since these * should be in registers we compare them first. Next we check for - * all ones which is perhaps fastest as ~val. Finally we weed out - * EEH disabled IO BARs. + * ff's which indicates a (very) possible failure. * * If this macro yields TRUE, the caller relays to eeh_check_failure() * which does further tests out of line. */ -/* #define EEH_POSSIBLE_ERROR(addr, vaddr, val) ((vaddr) != (addr) && ~(val) == 0 && !IS_EEH_TOKEN_DISABLED(addr)) */ +/* #define EEH_POSSIBLE_IO_ERROR(val) (~(val) == 0) */ +/* #define EEH_POSSIBLE_ERROR(addr, vaddr, val) ((vaddr) != (addr) && EEH_POSSIBLE_IO_ERROR(val) */ /* This version is rearranged to collect some profiling data */ -#define EEH_POSSIBLE_ERROR(addr, vaddr, val) (~(val) == 0 && (++eeh_total_mmio_ffs, (vaddr) != (addr) && !IS_EEH_TOKEN_DISABLED(addr))) +#define EEH_POSSIBLE_IO_ERROR(val) (~(val) == 0 && ++eeh_total_mmio_ffs) +#define EEH_POSSIBLE_ERROR(addr, vaddr, val) (EEH_POSSIBLE_IO_ERROR(val) && (vaddr) != (addr)) /* * MMIO read/write operations with EEH support. @@ -149,38 +147,56 @@ static inline void eeh_memcpy_toio(void *dest, void *src, unsigned long n) { memcpy(vdest, src, n); } -static inline void eeh_insb(volatile u8 *addr, void *buf, int n) { - volatile u8 *vaddr = (volatile u8 *)IO_TOKEN_TO_ADDR(addr); - _insb(vaddr, buf, n); - /* ToDo: look for ff's in buf[n] */ -} +/* The I/O macros must handle ISA ports as well as PCI I/O bars. + * ISA does not implement EEH and ISA may not exist in the system. + * For PCI we check for EEH failures. + */ +#define _IO_IS_ISA(port) ((port) < 0x10000) +#define _IO_HAS_ISA_BUS (isa_io_base != 0) -static inline void eeh_outsb(volatile u8 *addr, const void *buf, int n) { - volatile u8 *vaddr = (volatile u8 *)IO_TOKEN_TO_ADDR(addr); - _outsb(vaddr, buf, n); +static inline u8 eeh_inb(unsigned long port) { + u8 val; + if (_IO_IS_ISA(port) && !_IO_HAS_ISA_BUS) + return ~0; + val = in_8((u8 *)(port+pci_io_base)); + if (!_IO_IS_ISA(port) && EEH_POSSIBLE_IO_ERROR(val)) + return eeh_check_failure((void*)(port+pci_io_base), val); + return val; } -static inline void eeh_insw_ns(volatile u16 *addr, void *buf, int n) { - volatile u16 *vaddr = (volatile u16 *)IO_TOKEN_TO_ADDR(addr); - _insw_ns(vaddr, buf, n); - /* ToDo: look for ffff's in buf[n] */ +static inline void eeh_outb(u8 val, unsigned long port) { + if (!_IO_IS_ISA(port) || _IO_HAS_ISA_BUS) + return out_8((u8 *)(port+pci_io_base), val); } -static inline void eeh_outsw_ns(volatile u16 *addr, const void *buf, int n) { - volatile u16 *vaddr = (volatile u16 *)IO_TOKEN_TO_ADDR(addr); - _outsw_ns(vaddr, buf, n); +static inline u16 eeh_inw(unsigned long port) { + u16 val; + if (_IO_IS_ISA(port) && !_IO_HAS_ISA_BUS) + return ~0; + val = in_le16((u16 *)(port+pci_io_base)); + if (!_IO_IS_ISA(port) && EEH_POSSIBLE_IO_ERROR(val)) + return eeh_check_failure((void*)(port+pci_io_base), val); + return val; } -static inline void eeh_insl_ns(volatile u32 *addr, void *buf, int n) { - volatile u32 *vaddr = (volatile u32 *)IO_TOKEN_TO_ADDR(addr); - _insl_ns(vaddr, buf, n); - /* ToDo: look for ffffffff's in buf[n] */ +static inline void eeh_outw(u16 val, unsigned long port) { + if (!_IO_IS_ISA(port) || _IO_HAS_ISA_BUS) + return out_le16((u16 *)(port+pci_io_base), val); } -static inline void eeh_outsl_ns(volatile u32 *addr, const void *buf, int n) { - volatile u32 *vaddr = (volatile u32 *)IO_TOKEN_TO_ADDR(addr); - _outsl_ns(vaddr, buf, n); +static inline u32 eeh_inl(unsigned long port) { + u32 val; + if (_IO_IS_ISA(port) && !_IO_HAS_ISA_BUS) + return ~0; + val = in_le32((u32 *)(port+pci_io_base)); + if (!_IO_IS_ISA(port) && EEH_POSSIBLE_IO_ERROR(val)) + return eeh_check_failure((void*)(port+pci_io_base), val); + return val; } +static inline void eeh_outl(u32 val, unsigned long port) { + if (!_IO_IS_ISA(port) || _IO_HAS_ISA_BUS) + return out_le32((u32 *)(port+pci_io_base), val); +} #endif /* _EEH_H */ diff --git a/include/asm-ppc64/errno.h b/include/asm-ppc64/errno.h index 1e3a86bd0595..69bc3b0c6cbe 100644 --- a/include/asm-ppc64/errno.h +++ b/include/asm-ppc64/errno.h @@ -13,12 +13,6 @@ #undef EDEADLOCK #define EDEADLOCK 58 /* File locking deadlock error */ -/* Should never be seen by user programs */ -#define ERESTARTSYS 512 -#define ERESTARTNOINTR 513 -#define ERESTARTNOHAND 514 /* restart if no handler.. */ -#define ENOIOCTLCMD 515 /* No ioctl command */ - -#define _LAST_ERRNO 515 +#define _LAST_ERRNO 516 #endif diff --git a/include/asm-ppc64/hvcall.h b/include/asm-ppc64/hvcall.h index 47671fc2e26d..cfbdf78de62c 100644 --- a/include/asm-ppc64/hvcall.h +++ b/include/asm-ppc64/hvcall.h @@ -57,6 +57,7 @@ #define H_IPI 0x6c #define H_IPOLL 0x70 #define H_XIRR 0x74 +#define H_PERFMON 0x7c #define HSC ".long 0x44000022\n" #define H_ENTER_r3 "li 3, 0x08\n" diff --git a/include/asm-ppc64/iSeries/HvCall.h b/include/asm-ppc64/iSeries/HvCall.h index dfa28eba4e51..824bf531c671 100644 --- a/include/asm-ppc64/iSeries/HvCall.h +++ b/include/asm-ppc64/iSeries/HvCall.h @@ -130,6 +130,7 @@ enum HvCall_VaryOffChunkRc #define HvCallBaseRouter28 HvCallBase + 28 #define HvCallBaseRouter29 HvCallBase + 29 #define HvCallBaseRouter30 HvCallBase + 30 +#define HvCallBaseSetDebugBus HvCallBase + 31 #define HvCallCcSetDABR HvCallCc + 7 @@ -205,5 +206,10 @@ static inline void HvCall_setDABR(unsigned long val) HvCall1(HvCallCcSetDABR, val); } +static inline void HvCall_setDebugBus(unsigned long val) +{ + HvCall1(HvCallBaseSetDebugBus, val); +} + #endif // _HVCALL_H diff --git a/include/asm-ppc64/io.h b/include/asm-ppc64/io.h index 7fcb9f620ef0..6d8d89a5e007 100644 --- a/include/asm-ppc64/io.h +++ b/include/asm-ppc64/io.h @@ -25,13 +25,7 @@ #undef __IO_DEBUG extern unsigned long isa_io_base; -extern unsigned long isa_mem_base; extern unsigned long pci_io_base; -extern unsigned long pci_dram_offset; -extern int have_print; -#define _IO_BASE isa_io_base -#define _ISA_MEM_BASE isa_mem_base -#define PCI_DRAM_OFFSET pci_dram_offset #ifdef CONFIG_PPC_ISERIES #define readb(addr) iSeries_Read_Byte((void*)(addr)) @@ -50,36 +44,45 @@ extern int have_print; #define outw(data,addr) writew(data,((unsigned long)(addr))) #define outl(data,addr) writel(data,((unsigned long)(addr))) #else -#define IS_MAPPED_VADDR(port) ((unsigned long)(port) >> 60UL) #define readb(addr) eeh_readb((void*)(addr)) #define readw(addr) eeh_readw((void*)(addr)) #define readl(addr) eeh_readl((void*)(addr)) #define writeb(data, addr) eeh_writeb((data), ((void*)(addr))) #define writew(data, addr) eeh_writew((data), ((void*)(addr))) #define writel(data, addr) eeh_writel((data), ((void*)(addr))) -#define memset_io(a,b,c) eeh_memset((void *)(a),(b),(c)) +#define memset_io(a,b,c) eeh_memset_io((void *)(a),(b),(c)) #define memcpy_fromio(a,b,c) eeh_memcpy_fromio((a),(void *)(b),(c)) #define memcpy_toio(a,b,c) eeh_memcpy_toio((void *)(a),(b),(c)) -#define inb(port) _inb((unsigned long)port) -#define outb(val, port) _outb(val, (unsigned long)port) -#define inw(port) _inw((unsigned long)port) -#define outw(val, port) _outw(val, (unsigned long)port) -#define inl(port) _inl((unsigned long)port) -#define outl(val, port) _outl(val, (unsigned long)port) +#define inb(port) eeh_inb((unsigned long)port) +#define outb(val, port) eeh_outb(val, (unsigned long)port) +#define inw(port) eeh_inw((unsigned long)port) +#define outw(val, port) eeh_outw(val, (unsigned long)port) +#define inl(port) eeh_inl((unsigned long)port) +#define outl(val, port) eeh_outl(val, (unsigned long)port) /* * The insw/outsw/insl/outsl macros don't do byte-swapping. * They are only used in practice for transferring buffers which * are arrays of bytes, and byte-swapping is not appropriate in * that case. - paulus */ -#define insb(port, buf, ns) eeh_insb((u8 *)(port), (buf), (ns)) -#define outsb(port, buf, ns) eeh_outsb((u8 *)(port), (buf), (ns)) -#define insw(port, buf, ns) eeh_insw_ns((u16 *)(port), (buf), (ns)) -#define outsw(port, buf, ns) eeh_outsw_ns((u16 *)(port), (buf), (ns)) -#define insl(port, buf, nl) eeh_insl_ns((u32 *)(port), (buf), (nl)) -#define outsl(port, buf, nl) eeh_outsl_ns((u32 *)(port), (buf), (nl)) +#define insb(port, buf, ns) _insb((u8 *)((port)+pci_io_base), (buf), (ns)) +#define outsb(port, buf, ns) _outsb((u8 *)((port)+pci_io_base), (buf), (ns)) +#define insw(port, buf, ns) _insw_ns((u16 *)((port)+pci_io_base), (buf), (ns)) +#define outsw(port, buf, ns) _outsw_ns((u16 *)((port)+pci_io_base), (buf), (ns)) +#define insl(port, buf, nl) _insl_ns((u32 *)((port)+pci_io_base), (buf), (nl)) +#define outsl(port, buf, nl) _outsl_ns((u32 *)((port)+pci_io_base), (buf), (nl)) #endif +extern void _insb(volatile u8 *port, void *buf, int ns); +extern void _outsb(volatile u8 *port, const void *buf, int ns); +extern void _insw(volatile u16 *port, void *buf, int ns); +extern void _outsw(volatile u16 *port, const void *buf, int ns); +extern void _insl(volatile u32 *port, void *buf, int nl); +extern void _outsl(volatile u32 *port, const void *buf, int nl); +extern void _insw_ns(volatile u16 *port, void *buf, int ns); +extern void _outsw_ns(volatile u16 *port, const void *buf, int ns); +extern void _insl_ns(volatile u32 *port, void *buf, int nl); +extern void _outsl_ns(volatile u32 *port, const void *buf, int nl); /* * output pause versions need a delay at least for the @@ -92,27 +95,15 @@ extern int have_print; #define inl_p(port) inl(port) #define outl_p(val, port) (udelay(1), outl((val, (port))) - -extern void _insb(volatile u8 *port, void *buf, int ns); -extern void _outsb(volatile u8 *port, const void *buf, int ns); -extern void _insw(volatile u16 *port, void *buf, int ns); -extern void _outsw(volatile u16 *port, const void *buf, int ns); -extern void _insl(volatile u32 *port, void *buf, int nl); -extern void _outsl(volatile u32 *port, const void *buf, int nl); -extern void _insw_ns(volatile u16 *port, void *buf, int ns); -extern void _outsw_ns(volatile u16 *port, const void *buf, int ns); -extern void _insl_ns(volatile u32 *port, void *buf, int nl); -extern void _outsl_ns(volatile u32 *port, const void *buf, int nl); - /* * The *_ns versions below don't do byte-swapping. * Neither do the standard versions now, these are just here * for older code. */ -#define insw_ns(port, buf, ns) insw(port, buf, ns) -#define outsw_ns(port, buf, ns) outsw(port, buf, ns) -#define insl_ns(port, buf, nl) insl(port, buf, nl) -#define outsl_ns(port, buf, nl) outsl(port, buf, nl) +#define insw_ns(port, buf, ns) _insw_ns((u16 *)((port)+pci_io_base), (buf), (ns)) +#define outsw_ns(port, buf, ns) _outsw_ns((u16 *)((port)+pci_io_base), (buf), (ns)) +#define insl_ns(port, buf, nl) _insl_ns((u32 *)((port)+pci_io_base), (buf), (nl)) +#define outsl_ns(port, buf, nl) _outsl_ns((u32 *)((port)+pci_io_base), (buf), (nl)) #define IO_SPACE_LIMIT ~(0UL) @@ -249,49 +240,6 @@ static inline void out_be32(volatile unsigned *addr, int val) #ifndef CONFIG_PPC_ISERIES #include <asm/eeh.h> - -static inline u8 _inb(unsigned long port) { - if (IS_MAPPED_VADDR(port)) - return readb((void *)port); - else if (_IO_BASE) - return in_8((u8 *)((port)+_IO_BASE)); - else - return 0xff; -} -static inline void _outb(u8 val, unsigned long port) { - if (IS_MAPPED_VADDR(port)) - return writeb(val, (void *)port); - else if (_IO_BASE) - out_8((u8 *)((port)+_IO_BASE), val); -} -static inline u16 _inw(unsigned long port) { - if (IS_MAPPED_VADDR(port)) - return readw((void *)port); - else if (_IO_BASE) - return in_le16((u16 *)((port)+_IO_BASE)); - else - return 0xffff; -} -static inline void _outw(u16 val, unsigned long port) { - if (IS_MAPPED_VADDR(port)) - return writew(val, (void *)port); - else if (_IO_BASE) - out_le16((u16 *)((port)+_IO_BASE), val); -} -static inline u32 _inl(unsigned long port) { - if (IS_MAPPED_VADDR(port)) - return readl((void *)port); - else if (_IO_BASE) - return in_le32((u32 *)((port)+_IO_BASE)); - else - return 0xffffffff; -} -static inline void _outl(u32 val, unsigned long port) { - if (IS_MAPPED_VADDR(port)) - return writel(val, (void *)port); - else if (_IO_BASE) - out_le32((u32 *)((port)+_IO_BASE), val); -} #endif #ifdef __KERNEL__ diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index 801f56a68c48..7eb130cd1ab8 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h @@ -168,8 +168,10 @@ static inline int get_order(unsigned long size) #define KERNELBASE PAGE_OFFSET #define VMALLOCBASE 0xD000000000000000 #define IOREGIONBASE 0xE000000000000000 +#define EEHREGIONBASE 0xA000000000000000 #define IO_REGION_ID (IOREGIONBASE>>REGION_SHIFT) +#define EEH_REGION_ID (EEHREGIONBASE>>REGION_SHIFT) #define VMALLOC_REGION_ID (VMALLOCBASE>>REGION_SHIFT) #define KERNEL_REGION_ID (KERNELBASE>>REGION_SHIFT) #define USER_REGION_ID (0UL) diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h index 9235e73b76a2..c3bdfe012ee3 100644 --- a/include/asm-ppc64/pci-bridge.h +++ b/include/asm-ppc64/pci-bridge.h @@ -12,17 +12,6 @@ struct device_node; struct pci_controller; -/* - * pci_io_base returns the memory address at which you can access - * the I/O space for PCI bus number `bus' (or NULL on error). - */ -extern void *pci_bus_io_base(unsigned int bus); -extern unsigned long pci_bus_io_base_phys(unsigned int bus); -extern unsigned long pci_bus_mem_base_phys(unsigned int bus); - -/* Get the PCI host controller for a bus */ -extern struct pci_controller* pci_bus_to_hose(int bus); - /* Get the PCI host controller for an OF device */ extern struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node); @@ -92,6 +81,7 @@ static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev) else return fetch_dev_dn(dev); } + /* Use this macro after the PCI bus walk for max performance when it * is known that sysdata is correct. */ diff --git a/include/asm-ppc64/pci.h b/include/asm-ppc64/pci.h index 6b06be2d3ff7..0b715895f043 100644 --- a/include/asm-ppc64/pci.h +++ b/include/asm-ppc64/pci.h @@ -9,18 +9,17 @@ * 2 of the License, or (at your option) any later version. */ -/* Values for the `which' argument to sys_pciconfig_iobase syscall. */ -#define IOBASE_BRIDGE_NUMBER 0 -#define IOBASE_MEMORY 1 -#define IOBASE_IO 2 -#define IOBASE_ISA_IO 3 -#define IOBASE_ISA_MEM 4 +#include <linux/types.h> +#include <linux/slab.h> +#include <linux/string.h> +#include <asm/scatterlist.h> +#include <asm/io.h> +#include <asm/prom.h> -/* Can be used to override the logic in pci_scan_bus for skipping - * already-configured bus numbers - to be used for buggy BIOSes - * or architectures with incomplete PCI setup by the loader. - */ -extern int pcibios_assign_all_busses(void); +static inline int pcibios_assign_all_busses(void) +{ + return 0; +} #define PCIBIOS_MIN_IO 0x1000 #define PCIBIOS_MIN_MEM 0x10000000 @@ -35,31 +34,8 @@ static inline void pcibios_penalize_isa_irq(int irq) /* We don't do dynamic PCI IRQ allocation */ } -#include <linux/types.h> -#include <linux/slab.h> -#include <linux/string.h> -#include <asm/scatterlist.h> -#include <asm/io.h> -#include <asm/prom.h> - struct pci_dev; -#define REG_SAVE_SIZE 64 -/************************************************************************ - * Structure to hold the data for PCI Register Save/Restore functions. * - ************************************************************************/ -struct pci_config_reg_save_area { - struct pci_dev* PciDev; /* Pointer to device(Sanity Check) */ - int Flags; /* Control & Info Flags */ - int RCode; /* Return Code on Save/Restore */ - int Register; /* Pointer to current register. */ - u8 Regs[REG_SAVE_SIZE]; /* Save Area */ -}; -/************************************************************************ - * Functions to support device reset * - ************************************************************************/ -extern int pci_reset_device(struct pci_dev*, int, int); -extern int pci_save_config_regs(struct pci_dev*,struct pci_config_reg_save_area*); -extern int pci_restore_config_regs(struct pci_dev*,struct pci_config_reg_save_area*); + extern char* pci_card_location(struct pci_dev*); extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, @@ -68,7 +44,7 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle); extern dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, - size_t size, int direction); + size_t size, int direction); extern void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction); extern int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, diff --git a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h index bfa5999deaac..dbe1889b3184 100644 --- a/include/asm-ppc64/prom.h +++ b/include/asm-ppc64/prom.h @@ -125,12 +125,18 @@ struct device_node { int n_intrs; struct interrupt_info *intrs; char *full_name; + + /* PCI stuff probably doesn't belong here */ int busno; /* for pci devices */ int bussubno; /* for pci devices */ int devfn; /* for pci devices */ +#define DN_STATUS_BIST_FAILED (1<<0) + int status; /* Current device status (non-zero is bad) */ + int eeh_mode; /* See eeh.h for possible EEH_MODEs */ + int eeh_config_addr; struct pci_controller *phb; /* for pci devices */ struct TceTable *tce_table; /* for phb's or bridges */ -#define DN_STATUS_BIST_FAILED (1<<0) + struct property *properties; struct device_node *parent; struct device_node *child; diff --git a/include/asm-ppc64/thread_info.h b/include/asm-ppc64/thread_info.h index 7a52e78711dc..6328a1cb563a 100644 --- a/include/asm-ppc64/thread_info.h +++ b/include/asm-ppc64/thread_info.h @@ -23,6 +23,7 @@ struct thread_info { unsigned long flags; /* low level flags */ int cpu; /* cpu we're on */ int preempt_count; /* not used at present */ + struct restart_block restart_block; }; /* @@ -37,6 +38,9 @@ struct thread_info { .flags = 0, \ .cpu = 0, \ .preempt_count = 1, \ + .restart_block = { \ + .fn = do_no_restart_syscall, \ + }, \ } #define init_thread_info (init_thread_union.thread_info) diff --git a/include/asm-ppc64/unistd.h b/include/asm-ppc64/unistd.h index 0b0eed3980a9..93a6f0176353 100644 --- a/include/asm-ppc64/unistd.h +++ b/include/asm-ppc64/unistd.h @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#define __NR_restart_syscall 0 #define __NR_exit 1 #define __NR_fork 2 #define __NR_read 3 |
