diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-12 16:48:29 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-12 16:48:29 -0800 |
commit | 0e670506668a43e1355b8f10c33d081a676bd521 (patch) | |
tree | 236d238cc234da1e6d375b5c2864cbac836fd71f /include | |
parent | 238523e1a15874b88955ff9c8f63e35597ae2857 (diff) | |
parent | bf7ececa9b68f4720f1ce344f442435660bcdae7 (diff) | |
download | linux-3.10-0e670506668a43e1355b8f10c33d081a676bd521.tar.gz linux-3.10-0e670506668a43e1355b8f10c33d081a676bd521.tar.bz2 linux-3.10-0e670506668a43e1355b8f10c33d081a676bd521.zip |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/ia32.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/local.h | 4 | ||||
-rw-r--r-- | include/asm-ia64/sn/pcidev.h | 20 | ||||
-rw-r--r-- | include/asm-ia64/spinlock.h | 12 |
4 files changed, 32 insertions, 6 deletions
diff --git a/include/asm-ia64/ia32.h b/include/asm-ia64/ia32.h index 8e746b2413a..f8044a1169c 100644 --- a/include/asm-ia64/ia32.h +++ b/include/asm-ia64/ia32.h @@ -13,6 +13,8 @@ # ifdef CONFIG_IA32_SUPPORT +#define IA32_PAGE_OFFSET 0xc0000000 + extern void ia32_cpu_init (void); extern void ia32_mem_init (void); extern void ia32_gdt_init (void); diff --git a/include/asm-ia64/local.h b/include/asm-ia64/local.h index 1dbd584ad85..dc519092ef4 100644 --- a/include/asm-ia64/local.h +++ b/include/asm-ia64/local.h @@ -17,8 +17,8 @@ typedef struct { #define local_set(l, i) atomic64_set(&(l)->val, i) #define local_inc(l) atomic64_inc(&(l)->val) #define local_dec(l) atomic64_dec(&(l)->val) -#define local_add(l) atomic64_add(&(l)->val) -#define local_sub(l) atomic64_sub(&(l)->val) +#define local_add(i, l) atomic64_add((i), &(l)->val) +#define local_sub(i, l) atomic64_sub((i), &(l)->val) /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc. */ diff --git a/include/asm-ia64/sn/pcidev.h b/include/asm-ia64/sn/pcidev.h index 49711d00ad0..f65d222ca5e 100644 --- a/include/asm-ia64/sn/pcidev.h +++ b/include/asm-ia64/sn/pcidev.h @@ -3,15 +3,27 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. + * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved. */ #ifndef _ASM_IA64_SN_PCI_PCIDEV_H #define _ASM_IA64_SN_PCI_PCIDEV_H #include <linux/pci.h> -#define SN_PCIDEV_INFO(pci_dev) \ - ((struct pcidev_info *)(pci_dev)->sysdata) +/* + * In ia64, pci_dev->sysdata must be a *pci_controller. To provide access to + * the pcidev_info structs for all devices under a controller, we extend the + * definition of pci_controller, via sn_pci_controller, to include a list + * of pcidev_info. + */ +struct sn_pci_controller { + struct pci_controller pci_controller; + struct list_head pcidev_info; +}; + +#define SN_PCI_CONTROLLER(dev) ((struct sn_pci_controller *) dev->sysdata) + +#define SN_PCIDEV_INFO(dev) sn_pcidev_info_get(dev) #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) @@ -53,11 +65,13 @@ struct pcidev_info { struct sn_irq_info *pdi_sn_irq_info; struct sn_pcibus_provider *pdi_provider; /* sn pci ops */ struct pci_dev *host_pci_dev; /* host bus link */ + struct list_head pdi_list; /* List of pcidev_info */ }; extern void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info); extern void sn_irq_unfixup(struct pci_dev *pci_dev); +extern struct pcidev_info * sn_pcidev_info_get(struct pci_dev *); extern void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus); extern void sn_bus_store_sysdata(struct pci_dev *dev); diff --git a/include/asm-ia64/spinlock.h b/include/asm-ia64/spinlock.h index 5b78611411c..0c91a76c5ea 100644 --- a/include/asm-ia64/spinlock.h +++ b/include/asm-ia64/spinlock.h @@ -201,6 +201,16 @@ static inline void __raw_write_unlock(raw_rwlock_t *x) #endif /* !ASM_SUPPORTED */ -#define __raw_read_trylock(lock) generic__raw_read_trylock(lock) +static inline int __raw_read_trylock(raw_rwlock_t *x) +{ + union { + raw_rwlock_t lock; + __u32 word; + } old, new; + old.lock = new.lock = *x; + old.lock.write_lock = new.lock.write_lock = 0; + ++new.lock.read_counter; + return (u32)ia64_cmpxchg4_acq((__u32 *)(x), new.word, old.word) == old.word; +} #endif /* _ASM_IA64_SPINLOCK_H */ |