diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-12 19:48:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-12 19:48:29 -0500 |
commit | 0e670506668a43e1355b8f10c33d081a676bd521 (patch) | |
tree | 236d238cc234da1e6d375b5c2864cbac836fd71f /include | |
parent | 238523e1a15874b88955ff9c8f63e35597ae2857 (diff) | |
parent | bf7ececa9b68f4720f1ce344f442435660bcdae7 (diff) |
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 8e746b2413a6..f8044a1169cd 100644 --- a/include/asm-ia64/ia32.h +++ b/include/asm-ia64/ia32.h | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | # ifdef CONFIG_IA32_SUPPORT | 14 | # ifdef CONFIG_IA32_SUPPORT |
15 | 15 | ||
16 | #define IA32_PAGE_OFFSET 0xc0000000 | ||
17 | |||
16 | extern void ia32_cpu_init (void); | 18 | extern void ia32_cpu_init (void); |
17 | extern void ia32_mem_init (void); | 19 | extern void ia32_mem_init (void); |
18 | extern void ia32_gdt_init (void); | 20 | extern void ia32_gdt_init (void); |
diff --git a/include/asm-ia64/local.h b/include/asm-ia64/local.h index 1dbd584ad851..dc519092ef4d 100644 --- a/include/asm-ia64/local.h +++ b/include/asm-ia64/local.h | |||
@@ -17,8 +17,8 @@ typedef struct { | |||
17 | #define local_set(l, i) atomic64_set(&(l)->val, i) | 17 | #define local_set(l, i) atomic64_set(&(l)->val, i) |
18 | #define local_inc(l) atomic64_inc(&(l)->val) | 18 | #define local_inc(l) atomic64_inc(&(l)->val) |
19 | #define local_dec(l) atomic64_dec(&(l)->val) | 19 | #define local_dec(l) atomic64_dec(&(l)->val) |
20 | #define local_add(l) atomic64_add(&(l)->val) | 20 | #define local_add(i, l) atomic64_add((i), &(l)->val) |
21 | #define local_sub(l) atomic64_sub(&(l)->val) | 21 | #define local_sub(i, l) atomic64_sub((i), &(l)->val) |
22 | 22 | ||
23 | /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc. */ | 23 | /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc. */ |
24 | 24 | ||
diff --git a/include/asm-ia64/sn/pcidev.h b/include/asm-ia64/sn/pcidev.h index 49711d00ad04..f65d222ca5e8 100644 --- a/include/asm-ia64/sn/pcidev.h +++ b/include/asm-ia64/sn/pcidev.h | |||
@@ -3,15 +3,27 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | #ifndef _ASM_IA64_SN_PCI_PCIDEV_H | 8 | #ifndef _ASM_IA64_SN_PCI_PCIDEV_H |
9 | #define _ASM_IA64_SN_PCI_PCIDEV_H | 9 | #define _ASM_IA64_SN_PCI_PCIDEV_H |
10 | 10 | ||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | 12 | ||
13 | #define SN_PCIDEV_INFO(pci_dev) \ | 13 | /* |
14 | ((struct pcidev_info *)(pci_dev)->sysdata) | 14 | * In ia64, pci_dev->sysdata must be a *pci_controller. To provide access to |
15 | * the pcidev_info structs for all devices under a controller, we extend the | ||
16 | * definition of pci_controller, via sn_pci_controller, to include a list | ||
17 | * of pcidev_info. | ||
18 | */ | ||
19 | struct sn_pci_controller { | ||
20 | struct pci_controller pci_controller; | ||
21 | struct list_head pcidev_info; | ||
22 | }; | ||
23 | |||
24 | #define SN_PCI_CONTROLLER(dev) ((struct sn_pci_controller *) dev->sysdata) | ||
25 | |||
26 | #define SN_PCIDEV_INFO(dev) sn_pcidev_info_get(dev) | ||
15 | 27 | ||
16 | #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ | 28 | #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ |
17 | (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) | 29 | (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) |
@@ -53,11 +65,13 @@ struct pcidev_info { | |||
53 | struct sn_irq_info *pdi_sn_irq_info; | 65 | struct sn_irq_info *pdi_sn_irq_info; |
54 | struct sn_pcibus_provider *pdi_provider; /* sn pci ops */ | 66 | struct sn_pcibus_provider *pdi_provider; /* sn pci ops */ |
55 | struct pci_dev *host_pci_dev; /* host bus link */ | 67 | struct pci_dev *host_pci_dev; /* host bus link */ |
68 | struct list_head pdi_list; /* List of pcidev_info */ | ||
56 | }; | 69 | }; |
57 | 70 | ||
58 | extern void sn_irq_fixup(struct pci_dev *pci_dev, | 71 | extern void sn_irq_fixup(struct pci_dev *pci_dev, |
59 | struct sn_irq_info *sn_irq_info); | 72 | struct sn_irq_info *sn_irq_info); |
60 | extern void sn_irq_unfixup(struct pci_dev *pci_dev); | 73 | extern void sn_irq_unfixup(struct pci_dev *pci_dev); |
74 | extern struct pcidev_info * sn_pcidev_info_get(struct pci_dev *); | ||
61 | extern void sn_pci_controller_fixup(int segment, int busnum, | 75 | extern void sn_pci_controller_fixup(int segment, int busnum, |
62 | struct pci_bus *bus); | 76 | struct pci_bus *bus); |
63 | extern void sn_bus_store_sysdata(struct pci_dev *dev); | 77 | 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 5b78611411c3..0c91a76c5ea3 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) | |||
201 | 201 | ||
202 | #endif /* !ASM_SUPPORTED */ | 202 | #endif /* !ASM_SUPPORTED */ |
203 | 203 | ||
204 | #define __raw_read_trylock(lock) generic__raw_read_trylock(lock) | 204 | static inline int __raw_read_trylock(raw_rwlock_t *x) |
205 | { | ||
206 | union { | ||
207 | raw_rwlock_t lock; | ||
208 | __u32 word; | ||
209 | } old, new; | ||
210 | old.lock = new.lock = *x; | ||
211 | old.lock.write_lock = new.lock.write_lock = 0; | ||
212 | ++new.lock.read_counter; | ||
213 | return (u32)ia64_cmpxchg4_acq((__u32 *)(x), new.word, old.word) == old.word; | ||
214 | } | ||
205 | 215 | ||
206 | #endif /* _ASM_IA64_SPINLOCK_H */ | 216 | #endif /* _ASM_IA64_SPINLOCK_H */ |