summaryrefslogtreecommitdiffstats
path: root/include/asm-alpha
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-alpha')
-rw-r--r--include/asm-alpha/atomic.h8
-rw-r--r--include/asm-alpha/bitops.h12
-rw-r--r--include/asm-alpha/parport.h2
-rw-r--r--include/asm-alpha/pci.h19
-rw-r--r--include/asm-alpha/semaphore-helper.h4
-rw-r--r--include/asm-alpha/semaphore.h16
-rw-r--r--include/asm-alpha/spinlock.h8
-rw-r--r--include/asm-alpha/system.h36
8 files changed, 63 insertions, 42 deletions
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h
index 67b74d356..81f7b8268 100644
--- a/include/asm-alpha/atomic.h
+++ b/include/asm-alpha/atomic.h
@@ -41,7 +41,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v)
" addl %0,%2,%0\n"
" stl_c %0,%1\n"
" beq %0,2f\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v))
@@ -56,7 +56,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v)
" subl %0,%2,%0\n"
" stl_c %0,%1\n"
" beq %0,2f\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v))
@@ -76,7 +76,7 @@ extern __inline__ long atomic_add_return(int i, atomic_t * v)
" stl_c %0,%1\n"
" beq %0,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v)), "=&r" (result)
@@ -94,7 +94,7 @@ extern __inline__ long atomic_sub_return(int i, atomic_t * v)
" stl_c %0,%1\n"
" beq %0,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
:"=&r" (temp), "=m" (__atomic_fool_gcc(v)), "=&r" (result)
diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h
index c590d9e51..0d7a881a7 100644
--- a/include/asm-alpha/bitops.h
+++ b/include/asm-alpha/bitops.h
@@ -31,7 +31,7 @@ extern __inline__ void set_bit(unsigned long nr, volatile void * addr)
" stl_c %0,%1\n"
" beq %0,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
@@ -52,7 +52,7 @@ extern __inline__ void clear_bit(unsigned long nr, volatile void * addr)
" stl_c %0,%1\n"
" beq %0,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
@@ -69,7 +69,7 @@ extern __inline__ void change_bit(unsigned long nr, volatile void * addr)
" xor %0,%2,%0\n"
" stl_c %0,%1\n"
" beq %0,3f\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m)
@@ -92,7 +92,7 @@ extern __inline__ int test_and_set_bit(unsigned long nr,
" beq %0,3f\n"
" mb\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
@@ -117,7 +117,7 @@ extern __inline__ int test_and_clear_bit(unsigned long nr,
" beq %0,3f\n"
" mb\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
@@ -140,7 +140,7 @@ extern __inline__ int test_and_change_bit(unsigned long nr,
" stl_c %0,%1\n"
" beq %0,3f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
:"=&r" (temp), "=m" (*m), "=&r" (oldbit)
diff --git a/include/asm-alpha/parport.h b/include/asm-alpha/parport.h
index bc6b79597..d1099fd8c 100644
--- a/include/asm-alpha/parport.h
+++ b/include/asm-alpha/parport.h
@@ -43,6 +43,8 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
count++;
} while (*io && (++i < PARPORT_PC_MAX_PORTS));
} else {
+ count += parport_pc_init_superio ();
+
/* Probe all the likely ports. */
if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0], NULL))
count++;
diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h
index 0cf0e1c75..4695112ce 100644
--- a/include/asm-alpha/pci.h
+++ b/include/asm-alpha/pci.h
@@ -118,7 +118,8 @@ extern void pci_unmap_sg(struct pci_dev *, struct scatterlist *, int, int);
again owns the buffer. */
extern inline void
-pci_dma_sync_single(struct pci_dev *dev, dma_addr_t dma_addr, long size, int direction)
+pci_dma_sync_single(struct pci_dev *dev, dma_addr_t dma_addr, long size,
+ int direction)
{
/* Nothing to do. */
}
@@ -128,19 +129,17 @@ pci_dma_sync_single(struct pci_dev *dev, dma_addr_t dma_addr, long size, int dir
for a scatter-gather list, same rules and usage. */
extern inline void
-pci_dma_sync_sg(struct pci_dev *dev, struct scatterlist *sg, int nents, int direction)
+pci_dma_sync_sg(struct pci_dev *dev, struct scatterlist *sg, int nents,
+ int direction)
{
/* Nothing to do. */
}
/* Return whether the given PCI device DMA address mask can
- * be supported properly. For example, if your device can
- * only drive the low 24-bits during PCI bus mastering, then
- * you would pass 0x00ffffff as the mask to this function.
- */
-extern inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask)
-{
- return 1;
-}
+ be supported properly. For example, if your device can
+ only drive the low 24-bits during PCI bus mastering, then
+ you would pass 0x00ffffff as the mask to this function. */
+
+extern int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask);
#endif /* __ALPHA_PCI_H */
diff --git a/include/asm-alpha/semaphore-helper.h b/include/asm-alpha/semaphore-helper.h
index 0577d2c93..2812510db 100644
--- a/include/asm-alpha/semaphore-helper.h
+++ b/include/asm-alpha/semaphore-helper.h
@@ -34,7 +34,7 @@ waking_non_zero(struct semaphore *sem)
" stl_c %0,%2\n"
" beq %0,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=r"(ret), "=r"(tmp), "=m"(__atomic_fool_gcc(&sem->waking))
@@ -104,7 +104,7 @@ waking_non_zero_interruptible(struct semaphore *sem, struct task_struct *tsk)
" stq_c %1,%4\n"
" beq %1,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=&r"(ret), "=&r"(tmp), "=&r"(tmp2), "=&r"(tmp3), "=m"(*sem)
diff --git a/include/asm-alpha/semaphore.h b/include/asm-alpha/semaphore.h
index 6cf9873f5..38bc05c6e 100644
--- a/include/asm-alpha/semaphore.h
+++ b/include/asm-alpha/semaphore.h
@@ -116,7 +116,7 @@ extern inline void down(struct semaphore * sem)
" beq $28,2f\n"
" blt $24,3f\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" jsr $28,($27),__down_failed\n"
@@ -153,7 +153,7 @@ extern inline int down_interruptible(struct semaphore * sem)
" blt $24,3f\n"
" mov $31,%0\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%2\n"
" jsr $28,($27),__down_failed_interruptible\n"
@@ -216,7 +216,7 @@ extern inline int down_trylock(struct semaphore * sem)
" stq_c %1,%4\n"
" beq %1,3f\n"
"2:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=&r"(ret), "=&r"(tmp), "=&r"(tmp2), "=&r"(sub)
@@ -253,7 +253,7 @@ extern inline void up(struct semaphore * sem)
" beq $28,2f\n"
" ble $24,3f\n"
"4:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" jsr $28,($27),__up_wakeup\n"
@@ -379,7 +379,7 @@ extern inline void down_read(struct rw_semaphore *sem)
" beq $28,2f\n"
" blt $25,3f\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" jsr $28,($27),__down_read_failed\n"
@@ -429,7 +429,7 @@ extern inline void down_write(struct rw_semaphore *sem)
" beq $28,2f\n"
" bne $25,3f\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" jsr $28,($27),__down_write_failed\n"
@@ -488,7 +488,7 @@ extern inline void up_read(struct rw_semaphore *sem)
" beq $28,2f\n"
" beq $24,3f\n"
"4:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: lda $24,%1\n"
" mov 0,$25\n"
@@ -538,7 +538,7 @@ extern inline void up_write(struct rw_semaphore *sem)
" beq $28,2f\n"
" blt $24,3f\n"
"4:\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
"3: ldah $25,%3($24)\n"
/* Only do the wake if we're no longer negative. */
diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h
index 6153b2a86..c14eb0909 100644
--- a/include/asm-alpha/spinlock.h
+++ b/include/asm-alpha/spinlock.h
@@ -78,7 +78,7 @@ static inline void spin_lock(spinlock_t * lock)
" stl_c %0,%1\n"
" beq %0,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: ldl %0,%1\n"
" blbs %0,2b\n"
" br 1b\n"
@@ -114,7 +114,7 @@ static inline void write_lock(rwlock_t * lock)
" stl_c %1,%0\n"
" beq %1,6f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"6: ldl %1,%0\n"
" bne %1,6b\n"
" br 1b\n"
@@ -135,7 +135,7 @@ static inline void read_lock(rwlock_t * lock)
" stl_c %1,%0\n"
" beq %1,6f\n"
"4: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"6: ldl %1,%0\n"
" blbs %1,6b\n"
" br 1b\n"
@@ -160,7 +160,7 @@ static inline void read_unlock(rwlock_t * lock)
" addl %1,2,%1\n"
" stl_c %1,%0\n"
" beq %1,6f\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"6: br 1b\n"
".previous"
: "=m" (__dummy_lock(lock)), "=&r" (regx)
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
index 15472dfbd..49d68b447 100644
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -259,11 +259,31 @@ __CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long);
__CALL_PAL_W1(wrusp, unsigned long);
__CALL_PAL_W1(wrvptptr, unsigned long);
-#define __cli() ((void) swpipl(7))
-#define __sti() ((void) swpipl(0))
+#define IPL_MIN 0
+#define IPL_SW0 1
+#define IPL_SW1 2
+#define IPL_DEV0 3
+#define IPL_DEV1 4
+#define IPL_TIMER 5
+#define IPL_PERF 6
+#define IPL_POWERFAIL 6
+#define IPL_MCHECK 7
+#define IPL_MAX 7
+
+#ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK
+#undef IPL_MIN
+#define IPL_MIN __min_ipl
+extern int __min_ipl;
+#endif
+
+#define getipl() (rdps() & 7)
+#define setipl(ipl) ((void) swpipl(ipl))
+
+#define __cli() setipl(IPL_MAX)
+#define __sti() setipl(IPL_MIN)
#define __save_flags(flags) ((flags) = rdps())
-#define __save_and_cli(flags) ((flags) = swpipl(7))
-#define __restore_flags(flags) ((void) swpipl(flags))
+#define __save_and_cli(flags) ((flags) = swpipl(IPL_MAX))
+#define __restore_flags(flags) setipl(flags)
#define local_irq_save(flags) __save_and_cli(flags)
#define local_irq_restore(flags) __restore_flags(flags)
@@ -332,7 +352,7 @@ __xchg_u32(volatile int *m, unsigned long val)
" stl_c %1,%2\n"
" beq %1,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
: "=&r" (val), "=&r" (dummy), "=m" (*m)
@@ -352,7 +372,7 @@ __xchg_u64(volatile long *m, unsigned long val)
" stq_c %1,%2\n"
" beq %1,2f\n"
" mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"2: br 1b\n"
".previous"
: "=&r" (val), "=&r" (dummy), "=m" (*m)
@@ -408,7 +428,7 @@ __cmpxchg_u32(volatile int *m, int old, int new)
" stl_c %1,%2\n"
" beq %1,3f\n"
"2: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=&r"(prev), "=&r"(cmp), "=m"(*m)
@@ -430,7 +450,7 @@ __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new)
" stq_c %1,%2\n"
" beq %1,3f\n"
"2: mb\n"
- ".section .text2,\"ax\"\n"
+ ".subsection 2\n"
"3: br 1b\n"
".previous"
: "=&r"(prev), "=&r"(cmp), "=m"(*m)