summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-12-13 00:07:46 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-13 00:07:46 -0500
commit783e3385a134305d49d7b431df6e591265e7ec14 (patch)
tree7db0b8f854201e2ad343ea5b1c6fab7c3bca5a9b /include
parentfd803241744ad6e4262b6588c6af89e8fb794098 (diff)
parent1cf9e8a7865c0ac216034e519cf6b8505055ea50 (diff)
Merge branch 'upstream-fixes'
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-pxa/irq.h5
-rw-r--r--include/asm-arm/io.h6
-rw-r--r--include/asm-arm/memory.h1
-rw-r--r--include/asm-ia64/ia32.h2
-rw-r--r--include/asm-ia64/local.h4
-rw-r--r--include/asm-ia64/sn/pcidev.h20
-rw-r--r--include/asm-ia64/spinlock.h12
7 files changed, 36 insertions, 14 deletions
diff --git a/include/asm-arm/arch-pxa/irq.h b/include/asm-arm/arch-pxa/irq.h
index d770e4b37ae1..48c60f5eff6a 100644
--- a/include/asm-arm/arch-pxa/irq.h
+++ b/include/asm-arm/arch-pxa/irq.h
@@ -12,8 +12,3 @@
#define fixup_irq(x) (x)
-/*
- * This prototype is required for cascading of multiplexed interrupts.
- * Since it doesn't exist elsewhere, we'll put it here for now.
- */
-extern void do_IRQ(int irq, struct pt_regs *regs);
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index ae69db4a1010..0cf4d4f99600 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -42,9 +42,9 @@ extern void __raw_writesb(void __iomem *addr, const void *data, int bytelen);
extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen);
extern void __raw_writesl(void __iomem *addr, const void *data, int longlen);
-extern void __raw_readsb(void __iomem *addr, void *data, int bytelen);
-extern void __raw_readsw(void __iomem *addr, void *data, int wordlen);
-extern void __raw_readsl(void __iomem *addr, void *data, int longlen);
+extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen);
+extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen);
+extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
#define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v))
#define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
index a547ee598c6c..3e572364ee73 100644
--- a/include/asm-arm/memory.h
+++ b/include/asm-arm/memory.h
@@ -122,6 +122,7 @@ static inline void *phys_to_virt(unsigned long x)
*/
#define __pa(x) __virt_to_phys((unsigned long)(x))
#define __va(x) ((void *)__phys_to_virt((unsigned long)(x)))
+#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
/*
* Virtual <-> DMA view memory address translations
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 @@
# 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 1dbd584ad851..dc519092ef4d 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 49711d00ad04..f65d222ca5e8 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 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)
#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 */