aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/bug.h3
-rw-r--r--include/asm-sparc64/errno.h4
-rw-r--r--include/asm-sparc64/mostek.h6
-rw-r--r--include/asm-sparc64/parport.h6
-rw-r--r--include/asm-sparc64/pgalloc.h9
-rw-r--r--include/asm-sparc64/pgtable.h5
-rw-r--r--include/asm-sparc64/siginfo.h2
-rw-r--r--include/asm-sparc64/signal.h24
-rw-r--r--include/asm-sparc64/spinlock.h4
9 files changed, 26 insertions, 37 deletions
diff --git a/include/asm-sparc64/bug.h b/include/asm-sparc64/bug.h
index 25c5b1dfe378..516bb27f3fc4 100644
--- a/include/asm-sparc64/bug.h
+++ b/include/asm-sparc64/bug.h
@@ -1,6 +1,7 @@
1#ifndef _SPARC64_BUG_H 1#ifndef _SPARC64_BUG_H
2#define _SPARC64_BUG_H 2#define _SPARC64_BUG_H
3 3
4#ifdef CONFIG_BUG
4#include <linux/compiler.h> 5#include <linux/compiler.h>
5 6
6#ifdef CONFIG_DEBUG_BUGVERBOSE 7#ifdef CONFIG_DEBUG_BUGVERBOSE
@@ -14,6 +15,8 @@ extern void do_BUG(const char *file, int line);
14#endif 15#endif
15 16
16#define HAVE_ARCH_BUG 17#define HAVE_ARCH_BUG
18#endif
19
17#include <asm-generic/bug.h> 20#include <asm-generic/bug.h>
18 21
19#endif 22#endif
diff --git a/include/asm-sparc64/errno.h b/include/asm-sparc64/errno.h
index cc98a73b55a7..ea3509ee1b0b 100644
--- a/include/asm-sparc64/errno.h
+++ b/include/asm-sparc64/errno.h
@@ -107,4 +107,8 @@
107#define EKEYREVOKED 130 /* Key has been revoked */ 107#define EKEYREVOKED 130 /* Key has been revoked */
108#define EKEYREJECTED 131 /* Key was rejected by service */ 108#define EKEYREJECTED 131 /* Key was rejected by service */
109 109
110/* for robust mutexes */
111#define EOWNERDEAD 132 /* Owner died */
112#define ENOTRECOVERABLE 133 /* State not recoverable */
113
110#endif /* !(_SPARC64_ERRNO_H) */ 114#endif /* !(_SPARC64_ERRNO_H) */
diff --git a/include/asm-sparc64/mostek.h b/include/asm-sparc64/mostek.h
index ccf2f5f82d7f..09b5aba6678a 100644
--- a/include/asm-sparc64/mostek.h
+++ b/include/asm-sparc64/mostek.h
@@ -38,7 +38,7 @@
38 * 38 *
39 * We now deal with physical addresses for I/O to the chip. -DaveM 39 * We now deal with physical addresses for I/O to the chip. -DaveM
40 */ 40 */
41static __inline__ u8 mostek_read(unsigned long addr) 41static __inline__ u8 mostek_read(void __iomem *addr)
42{ 42{
43 u8 ret; 43 u8 ret;
44 44
@@ -48,7 +48,7 @@ static __inline__ u8 mostek_read(unsigned long addr)
48 return ret; 48 return ret;
49} 49}
50 50
51static __inline__ void mostek_write(unsigned long addr, u8 val) 51static __inline__ void mostek_write(void __iomem *addr, u8 val)
52{ 52{
53 __asm__ __volatile__("stba %0, [%1] %2" 53 __asm__ __volatile__("stba %0, [%1] %2"
54 : /* no outputs */ 54 : /* no outputs */
@@ -67,7 +67,7 @@ static __inline__ void mostek_write(unsigned long addr, u8 val)
67#define MOSTEK_YEAR 0x07ffUL 67#define MOSTEK_YEAR 0x07ffUL
68 68
69extern spinlock_t mostek_lock; 69extern spinlock_t mostek_lock;
70extern unsigned long mstk48t02_regs; 70extern void __iomem *mstk48t02_regs;
71 71
72/* Control register values. */ 72/* Control register values. */
73#define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */ 73#define MSTK_CREG_WRITE 0x80 /* Must set this before placing values. */
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h
index ab88349ddadc..b7e635544cec 100644
--- a/include/asm-sparc64/parport.h
+++ b/include/asm-sparc64/parport.h
@@ -13,6 +13,12 @@
13 13
14#define PARPORT_PC_MAX_PORTS PARPORT_MAX 14#define PARPORT_PC_MAX_PORTS PARPORT_MAX
15 15
16/*
17 * While sparc64 doesn't have an ISA DMA API, we provide something that looks
18 * close enough to make parport_pc happy
19 */
20#define HAS_DMA
21
16static struct sparc_ebus_info { 22static struct sparc_ebus_info {
17 struct ebus_dma_info info; 23 struct ebus_dma_info info;
18 unsigned int addr; 24 unsigned int addr;
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
index 2c28e1f605b7..b9b1914aae63 100644
--- a/include/asm-sparc64/pgalloc.h
+++ b/include/asm-sparc64/pgalloc.h
@@ -122,17 +122,12 @@ static __inline__ void free_pmd_slow(pmd_t *pmd)
122#define pmd_populate(MM,PMD,PTE_PAGE) \ 122#define pmd_populate(MM,PMD,PTE_PAGE) \
123 pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE)) 123 pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE))
124 124
125extern pte_t *__pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address); 125extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address);
126
127static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
128{
129 return __pte_alloc_one_kernel(mm, address);
130}
131 126
132static inline struct page * 127static inline struct page *
133pte_alloc_one(struct mm_struct *mm, unsigned long addr) 128pte_alloc_one(struct mm_struct *mm, unsigned long addr)
134{ 129{
135 pte_t *pte = __pte_alloc_one_kernel(mm, addr); 130 pte_t *pte = pte_alloc_one_kernel(mm, addr);
136 131
137 if (pte) 132 if (pte)
138 return virt_to_page(pte); 133 return virt_to_page(pte);
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index af9bf175a223..ae2cd5b09a7c 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -416,6 +416,11 @@ extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
416 unsigned long pfn, 416 unsigned long pfn,
417 unsigned long size, pgprot_t prot); 417 unsigned long size, pgprot_t prot);
418 418
419/* Clear virtual and physical cachability, set side-effect bit. */
420#define pgprot_noncached(prot) \
421 (__pgprot((pgprot_val(prot) & ~(_PAGE_CP | _PAGE_CV)) | \
422 _PAGE_E))
423
419/* 424/*
420 * For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in 425 * For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in
421 * its high 4 bits. These macros/functions put it there or get it from there. 426 * its high 4 bits. These macros/functions put it there or get it from there.
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
index 7160449e7cab..df17e47abc1c 100644
--- a/include/asm-sparc64/siginfo.h
+++ b/include/asm-sparc64/siginfo.h
@@ -3,8 +3,6 @@
3 3
4#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) 4#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
5 5
6#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
7
8#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) 6#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
9#define __ARCH_SI_TRAPNO 7#define __ARCH_SI_TRAPNO
10#define __ARCH_SI_BAND_T int 8#define __ARCH_SI_BAND_T int
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index 6428e366c38c..becdf1bc5924 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -145,7 +145,6 @@ struct sigstack {
145#define SA_ONESHOT _SV_RESET 145#define SA_ONESHOT _SV_RESET
146#define SA_INTERRUPT 0x10u 146#define SA_INTERRUPT 0x10u
147#define SA_NOMASK 0x20u 147#define SA_NOMASK 0x20u
148#define SA_SHIRQ 0x40u
149#define SA_NOCLDWAIT 0x100u 148#define SA_NOCLDWAIT 0x100u
150#define SA_SIGINFO 0x200u 149#define SA_SIGINFO 0x200u
151 150
@@ -165,11 +164,6 @@ struct sigstack {
165 164
166#ifdef __KERNEL__ 165#ifdef __KERNEL__
167/* 166/*
168 * These values of sa_flags are used only by the kernel as part of the
169 * irq handling routines.
170 *
171 * SA_INTERRUPT is also used by the irq handling routines.
172 *
173 * DJHR 167 * DJHR
174 * SA_STATIC_ALLOC is used for the SPARC system to indicate that this 168 * SA_STATIC_ALLOC is used for the SPARC system to indicate that this
175 * interrupt handler's irq structure should be statically allocated 169 * interrupt handler's irq structure should be statically allocated
@@ -180,26 +174,10 @@ struct sigstack {
180 * statically allocated data.. which is NOT GOOD. 174 * statically allocated data.. which is NOT GOOD.
181 * 175 *
182 */ 176 */
183#define SA_PROBE SA_ONESHOT
184#define SA_SAMPLE_RANDOM SA_RESTART
185#define SA_STATIC_ALLOC 0x80 177#define SA_STATIC_ALLOC 0x80
186#endif 178#endif
187 179
188/* Type of a signal handler. */ 180#include <asm-generic/signal.h>
189#ifdef __KERNEL__
190typedef void __signalfn_t(int);
191typedef __signalfn_t __user *__sighandler_t;
192
193typedef void __restorefn_t(void);
194typedef __restorefn_t __user *__sigrestore_t;
195#else
196typedef void (*__sighandler_t)(int);
197typedef void (*__sigrestore_t)(void);
198#endif
199
200#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
201#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
202#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
203 181
204struct __new_sigaction { 182struct __new_sigaction {
205 __sighandler_t sa_handler; 183 __sighandler_t sa_handler;
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h
index d1f91a4f24ae..db7581bdb531 100644
--- a/include/asm-sparc64/spinlock.h
+++ b/include/asm-sparc64/spinlock.h
@@ -44,7 +44,7 @@ typedef struct {
44 44
45#define spin_unlock_wait(lp) \ 45#define spin_unlock_wait(lp) \
46do { membar("#LoadLoad"); \ 46do { membar("#LoadLoad"); \
47} while(lp->lock) 47} while((lp)->lock)
48 48
49static inline void _raw_spin_lock(spinlock_t *lock) 49static inline void _raw_spin_lock(spinlock_t *lock)
50{ 50{
@@ -149,7 +149,7 @@ typedef struct {
149 unsigned int break_lock; 149 unsigned int break_lock;
150#endif 150#endif
151} rwlock_t; 151} rwlock_t;
152#define RW_LOCK_UNLOCKED {0,} 152#define RW_LOCK_UNLOCKED (rwlock_t) {0,}
153#define rwlock_init(lp) do { *(lp) = RW_LOCK_UNLOCKED; } while(0) 153#define rwlock_init(lp) do { *(lp) = RW_LOCK_UNLOCKED; } while(0)
154 154
155static void inline __read_lock(rwlock_t *lock) 155static void inline __read_lock(rwlock_t *lock)