summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/asm_offsets.h162
-rw-r--r--include/asm-sparc64/checksum.h24
-rw-r--r--include/asm-sparc64/dma.h6
-rw-r--r--include/asm-sparc64/floppy.h17
-rw-r--r--include/asm-sparc64/io.h2
-rw-r--r--include/asm-sparc64/parport.h2
-rw-r--r--include/asm-sparc64/pci.h57
-rw-r--r--include/asm-sparc64/processor.h15
-rw-r--r--include/asm-sparc64/sbus.h12
-rw-r--r--include/asm-sparc64/semaphore.h11
-rw-r--r--include/asm-sparc64/siginfo.h9
-rw-r--r--include/asm-sparc64/smp.h6
-rw-r--r--include/asm-sparc64/termbits.h3
-rw-r--r--include/asm-sparc64/types.h4
-rw-r--r--include/asm-sparc64/unistd.h2
15 files changed, 177 insertions, 155 deletions
diff --git a/include/asm-sparc64/asm_offsets.h b/include/asm-sparc64/asm_offsets.h
index 07dfc1d30..895583bb8 100644
--- a/include/asm-sparc64/asm_offsets.h
+++ b/include/asm-sparc64/asm_offsets.h
@@ -165,34 +165,34 @@
#define AOFF_task_semsleeping 0x00000378
#define ASIZ_task_semsleeping 0x00000008
#define AOFF_task_thread 0x00000380
-#define ASIZ_task_thread 0x00000460
-#define AOFF_task_fs 0x000007e0
+#define ASIZ_task_thread 0x00000450
+#define AOFF_task_fs 0x000007d0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000007e8
+#define AOFF_task_files 0x000007d8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_sigmask_lock 0x000007f0
+#define AOFF_task_sigmask_lock 0x000007e0
#define ASIZ_task_sigmask_lock 0x00000000
-#define AOFF_task_sig 0x000007f0
+#define AOFF_task_sig 0x000007e0
#define ASIZ_task_sig 0x00000008
-#define AOFF_task_signal 0x000007f8
+#define AOFF_task_signal 0x000007e8
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x00000800
+#define AOFF_task_blocked 0x000007f0
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000808
+#define AOFF_task_sigqueue 0x000007f8
#define ASIZ_task_sigqueue 0x00000008
-#define AOFF_task_sigqueue_tail 0x00000810
+#define AOFF_task_sigqueue_tail 0x00000800
#define ASIZ_task_sigqueue_tail 0x00000008
-#define AOFF_task_sas_ss_sp 0x00000818
+#define AOFF_task_sas_ss_sp 0x00000808
#define ASIZ_task_sas_ss_sp 0x00000008
-#define AOFF_task_sas_ss_size 0x00000820
+#define AOFF_task_sas_ss_size 0x00000810
#define ASIZ_task_sas_ss_size 0x00000008
-#define AOFF_task_parent_exec_id 0x00000828
+#define AOFF_task_parent_exec_id 0x00000818
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x0000082c
+#define AOFF_task_self_exec_id 0x0000081c
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_exit_sem 0x00000830
+#define AOFF_task_exit_sem 0x00000820
#define ASIZ_task_exit_sem 0x00000030
-#define ASIZ_task 0x00000860
+#define ASIZ_task 0x00000850
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000008
#define AOFF_mm_mmap_avl 0x00000008
@@ -278,29 +278,23 @@
#define ASIZ_thread_gsr 0x00000007
#define AOFF_thread___pad2 0x0000002f
#define ASIZ_thread___pad2 0x00000001
-#define AOFF_thread_sig_address 0x00000030
-#define ASIZ_thread_sig_address 0x00000008
-#define AOFF_thread_sig_desc 0x00000038
-#define ASIZ_thread_sig_desc 0x00000008
-#define AOFF_thread_xfsr 0x00000040
+#define AOFF_thread_xfsr 0x00000030
#define ASIZ_thread_xfsr 0x00000038
-#define AOFF_thread___pad3 0x00000078
-#define ASIZ_thread___pad3 0x00000008
-#define AOFF_thread_reg_window 0x00000080
+#define AOFF_thread_reg_window 0x00000068
#define ASIZ_thread_reg_window 0x00000380
-#define AOFF_thread_rwbuf_stkptrs 0x00000400
+#define AOFF_thread_rwbuf_stkptrs 0x000003e8
#define ASIZ_thread_rwbuf_stkptrs 0x00000038
-#define AOFF_thread_user_cntd0 0x00000438
+#define AOFF_thread_user_cntd0 0x00000420
#define ASIZ_thread_user_cntd0 0x00000008
-#define AOFF_thread_user_cntd1 0x00000440
+#define AOFF_thread_user_cntd1 0x00000428
#define ASIZ_thread_user_cntd1 0x00000008
-#define AOFF_thread_kernel_cntd0 0x00000448
+#define AOFF_thread_kernel_cntd0 0x00000430
#define ASIZ_thread_kernel_cntd0 0x00000008
-#define AOFF_thread_kernel_cntd1 0x00000450
+#define AOFF_thread_kernel_cntd1 0x00000438
#define ASIZ_thread_kernel_cntd1 0x00000008
-#define AOFF_thread_pcr_reg 0x00000458
+#define AOFF_thread_pcr_reg 0x00000440
#define ASIZ_thread_pcr_reg 0x00000008
-#define ASIZ_thread 0x00000460
+#define ASIZ_thread 0x00000450
#else /* CONFIG_SMP */
@@ -459,34 +453,34 @@
#define AOFF_task_semsleeping 0x00000570
#define ASIZ_task_semsleeping 0x00000008
#define AOFF_task_thread 0x00000580
-#define ASIZ_task_thread 0x00000460
-#define AOFF_task_fs 0x000009e0
+#define ASIZ_task_thread 0x00000450
+#define AOFF_task_fs 0x000009d0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000009e8
+#define AOFF_task_files 0x000009d8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_sigmask_lock 0x000009f0
+#define AOFF_task_sigmask_lock 0x000009e0
#define ASIZ_task_sigmask_lock 0x00000001
-#define AOFF_task_sig 0x000009f8
+#define AOFF_task_sig 0x000009e8
#define ASIZ_task_sig 0x00000008
-#define AOFF_task_signal 0x00000a00
+#define AOFF_task_signal 0x000009f0
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x00000a08
+#define AOFF_task_blocked 0x000009f8
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000a10
+#define AOFF_task_sigqueue 0x00000a00
#define ASIZ_task_sigqueue 0x00000008
-#define AOFF_task_sigqueue_tail 0x00000a18
+#define AOFF_task_sigqueue_tail 0x00000a08
#define ASIZ_task_sigqueue_tail 0x00000008
-#define AOFF_task_sas_ss_sp 0x00000a20
+#define AOFF_task_sas_ss_sp 0x00000a10
#define ASIZ_task_sas_ss_sp 0x00000008
-#define AOFF_task_sas_ss_size 0x00000a28
+#define AOFF_task_sas_ss_size 0x00000a18
#define ASIZ_task_sas_ss_size 0x00000008
-#define AOFF_task_parent_exec_id 0x00000a30
+#define AOFF_task_parent_exec_id 0x00000a20
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x00000a34
+#define AOFF_task_self_exec_id 0x00000a24
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_exit_sem 0x00000a38
+#define AOFF_task_exit_sem 0x00000a28
#define ASIZ_task_exit_sem 0x00000038
-#define ASIZ_task 0x00000a70
+#define ASIZ_task 0x00000a60
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000008
#define AOFF_mm_mmap_avl 0x00000008
@@ -572,29 +566,23 @@
#define ASIZ_thread_gsr 0x00000007
#define AOFF_thread___pad2 0x0000002f
#define ASIZ_thread___pad2 0x00000001
-#define AOFF_thread_sig_address 0x00000030
-#define ASIZ_thread_sig_address 0x00000008
-#define AOFF_thread_sig_desc 0x00000038
-#define ASIZ_thread_sig_desc 0x00000008
-#define AOFF_thread_xfsr 0x00000040
+#define AOFF_thread_xfsr 0x00000030
#define ASIZ_thread_xfsr 0x00000038
-#define AOFF_thread___pad3 0x00000078
-#define ASIZ_thread___pad3 0x00000008
-#define AOFF_thread_reg_window 0x00000080
+#define AOFF_thread_reg_window 0x00000068
#define ASIZ_thread_reg_window 0x00000380
-#define AOFF_thread_rwbuf_stkptrs 0x00000400
+#define AOFF_thread_rwbuf_stkptrs 0x000003e8
#define ASIZ_thread_rwbuf_stkptrs 0x00000038
-#define AOFF_thread_user_cntd0 0x00000438
+#define AOFF_thread_user_cntd0 0x00000420
#define ASIZ_thread_user_cntd0 0x00000008
-#define AOFF_thread_user_cntd1 0x00000440
+#define AOFF_thread_user_cntd1 0x00000428
#define ASIZ_thread_user_cntd1 0x00000008
-#define AOFF_thread_kernel_cntd0 0x00000448
+#define AOFF_thread_kernel_cntd0 0x00000430
#define ASIZ_thread_kernel_cntd0 0x00000008
-#define AOFF_thread_kernel_cntd1 0x00000450
+#define AOFF_thread_kernel_cntd1 0x00000438
#define ASIZ_thread_kernel_cntd1 0x00000008
-#define AOFF_thread_pcr_reg 0x00000458
+#define AOFF_thread_pcr_reg 0x00000440
#define ASIZ_thread_pcr_reg 0x00000008
-#define ASIZ_thread 0x00000460
+#define ASIZ_thread 0x00000450
#else /* SPIN_LOCK_DEBUG */
@@ -751,34 +739,34 @@
#define AOFF_task_semsleeping 0x00000578
#define ASIZ_task_semsleeping 0x00000008
#define AOFF_task_thread 0x00000580
-#define ASIZ_task_thread 0x00000460
-#define AOFF_task_fs 0x000009e0
+#define ASIZ_task_thread 0x00000450
+#define AOFF_task_fs 0x000009d0
#define ASIZ_task_fs 0x00000008
-#define AOFF_task_files 0x000009e8
+#define AOFF_task_files 0x000009d8
#define ASIZ_task_files 0x00000008
-#define AOFF_task_sigmask_lock 0x000009f0
+#define AOFF_task_sigmask_lock 0x000009e0
#define ASIZ_task_sigmask_lock 0x0000000c
-#define AOFF_task_sig 0x00000a00
+#define AOFF_task_sig 0x000009f0
#define ASIZ_task_sig 0x00000008
-#define AOFF_task_signal 0x00000a08
+#define AOFF_task_signal 0x000009f8
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x00000a10
+#define AOFF_task_blocked 0x00000a00
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x00000a18
+#define AOFF_task_sigqueue 0x00000a08
#define ASIZ_task_sigqueue 0x00000008
-#define AOFF_task_sigqueue_tail 0x00000a20
+#define AOFF_task_sigqueue_tail 0x00000a10
#define ASIZ_task_sigqueue_tail 0x00000008
-#define AOFF_task_sas_ss_sp 0x00000a28
+#define AOFF_task_sas_ss_sp 0x00000a18
#define ASIZ_task_sas_ss_sp 0x00000008
-#define AOFF_task_sas_ss_size 0x00000a30
+#define AOFF_task_sas_ss_size 0x00000a20
#define ASIZ_task_sas_ss_size 0x00000008
-#define AOFF_task_parent_exec_id 0x00000a38
+#define AOFF_task_parent_exec_id 0x00000a28
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x00000a3c
+#define AOFF_task_self_exec_id 0x00000a2c
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_exit_sem 0x00000a40
+#define AOFF_task_exit_sem 0x00000a30
#define ASIZ_task_exit_sem 0x00000040
-#define ASIZ_task 0x00000a80
+#define ASIZ_task 0x00000a70
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000008
#define AOFF_mm_mmap_avl 0x00000008
@@ -864,29 +852,23 @@
#define ASIZ_thread_gsr 0x00000007
#define AOFF_thread___pad2 0x0000002f
#define ASIZ_thread___pad2 0x00000001
-#define AOFF_thread_sig_address 0x00000030
-#define ASIZ_thread_sig_address 0x00000008
-#define AOFF_thread_sig_desc 0x00000038
-#define ASIZ_thread_sig_desc 0x00000008
-#define AOFF_thread_xfsr 0x00000040
+#define AOFF_thread_xfsr 0x00000030
#define ASIZ_thread_xfsr 0x00000038
-#define AOFF_thread___pad3 0x00000078
-#define ASIZ_thread___pad3 0x00000008
-#define AOFF_thread_reg_window 0x00000080
+#define AOFF_thread_reg_window 0x00000068
#define ASIZ_thread_reg_window 0x00000380
-#define AOFF_thread_rwbuf_stkptrs 0x00000400
+#define AOFF_thread_rwbuf_stkptrs 0x000003e8
#define ASIZ_thread_rwbuf_stkptrs 0x00000038
-#define AOFF_thread_user_cntd0 0x00000438
+#define AOFF_thread_user_cntd0 0x00000420
#define ASIZ_thread_user_cntd0 0x00000008
-#define AOFF_thread_user_cntd1 0x00000440
+#define AOFF_thread_user_cntd1 0x00000428
#define ASIZ_thread_user_cntd1 0x00000008
-#define AOFF_thread_kernel_cntd0 0x00000448
+#define AOFF_thread_kernel_cntd0 0x00000430
#define ASIZ_thread_kernel_cntd0 0x00000008
-#define AOFF_thread_kernel_cntd1 0x00000450
+#define AOFF_thread_kernel_cntd1 0x00000438
#define ASIZ_thread_kernel_cntd1 0x00000008
-#define AOFF_thread_pcr_reg 0x00000458
+#define AOFF_thread_pcr_reg 0x00000440
#define ASIZ_thread_pcr_reg 0x00000008
-#define ASIZ_thread 0x00000460
+#define ASIZ_thread 0x00000450
#endif /* SPIN_LOCK_DEBUG */
#endif /* CONFIG_SMP */
diff --git a/include/asm-sparc64/checksum.h b/include/asm-sparc64/checksum.h
index 6f6f8fe06..b2c06823a 100644
--- a/include/asm-sparc64/checksum.h
+++ b/include/asm-sparc64/checksum.h
@@ -1,4 +1,4 @@
-/* $Id: checksum.h,v 1.14 2000/01/05 21:27:42 davem Exp $ */
+/* $Id: checksum.h,v 1.15 2000/01/19 04:06:09 davem Exp $ */
#ifndef __SPARC64_CHECKSUM_H
#define __SPARC64_CHECKSUM_H
@@ -37,12 +37,6 @@ extern unsigned int csum_partial(const unsigned char * buff, int len, unsigned i
* here even more important to align src and dst on a 32-bit (or even
* better 64-bit) boundary
*/
-/* FIXME: Remove these macros ASAP */
-#define csum_partial_copy(src, dst, len, sum) \
- csum_partial_copy_nocheck(src,dst,len,sum)
-#define csum_partial_copy_fromuser(s, d, l, w) \
- csum_partial_copy_from_user((char *) (s), (d), (l), (w), NULL)
-
extern unsigned int csum_partial_copy_sparc64(const char *src, char *dst, int len, unsigned int sum);
extern __inline__ unsigned int
@@ -66,15 +60,19 @@ csum_partial_copy_from_user(const char *src, char *dst, int len,
return csum_partial_copy_sparc64(src, dst, len, sum);
}
-#if 0
-/* XXX should implement this now... -DaveM */
+/*
+ * Copy and checksum to user
+ */
+#define HAVE_CSUM_COPY_USER
+extern unsigned int csum_partial_copy_user_sparc64(const char *src, char *dst, int len, unsigned int sum);
extern __inline__ unsigned int
-csum_partial_copy_to_user(const char *src, char *dst, int len,
- unsigned int sum, int *err)
+csum_and_copy_to_user(const char *src, char *dst, int len,
+ unsigned int sum, int *err)
{
- return 0;
+ __asm__ __volatile__ ("stx %0, [%%sp + 0x7ff + 128]"
+ : : "r" (err));
+ return csum_partial_copy_user_sparc64(src, dst, len, sum);
}
-#endif
/* ihl is always 5 or greater, almost always is 5, and iph is word aligned
* the majority of the time.
diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h
index 9bab4ebca..4f0b0baf2 100644
--- a/include/asm-sparc64/dma.h
+++ b/include/asm-sparc64/dma.h
@@ -218,4 +218,10 @@ extern int isa_dma_bridge_buggy;
#define isa_dma_bridge_buggy (0)
#endif
+/* We support dynamic DMA remapping and adjacent SG entries
+ * which have addresses modulo DMA_CHUNK_SIZE will be merged
+ * by dma_prepare_sg().
+ */
+#define DMA_CHUNK_SIZE 8192
+
#endif /* !(_ASM_SPARC64_DMA_H) */
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h
index 9a7fd950a..3758686e2 100644
--- a/include/asm-sparc64/floppy.h
+++ b/include/asm-sparc64/floppy.h
@@ -270,7 +270,10 @@ static int sun_fd_eject(int drive)
#include <asm/ns87303.h>
static struct linux_ebus_dma *sun_pci_fd_ebus_dma;
+static struct pci_dev *sun_pci_ebus_dev;
static int sun_pci_broken_drive = -1;
+static unsigned int sun_pci_dma_addr = -1U;
+static int sun_pci_dma_len;
extern void floppy_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -363,6 +366,11 @@ static void sun_pci_fd_disable_dma(void)
writel(dcsr, &sun_pci_fd_ebus_dma->dcsr);
}
}
+ if (sun_pci_dma_addr != -1U)
+ pci_unmap_single(sun_pci_ebus_dev,
+ sun_pci_dma_addr,
+ sun_pci_dma_len);
+ sun_pci_dma_addr = -1U;
}
static void sun_pci_fd_set_dma_mode(int mode)
@@ -389,12 +397,17 @@ static void sun_pci_fd_set_dma_mode(int mode)
static void sun_pci_fd_set_dma_count(int length)
{
+ sun_pci_dma_len = length;
writel(length, &sun_pci_fd_ebus_dma->dbcr);
}
static void sun_pci_fd_set_dma_addr(char *buffer)
{
- unsigned int addr = virt_to_bus(buffer);
+ unsigned int addr;
+
+ addr = sun_pci_dma_addr = pci_map_single(sun_pci_ebus_dev,
+ buffer,
+ sun_pci_dma_len);
writel(addr, &sun_pci_fd_ebus_dma->dacr);
}
@@ -599,6 +612,8 @@ static unsigned long __init sun_floppy_init(void)
auxio_reg = edev->resource[2].start;
writel(readl(auxio_reg)|0x2, auxio_reg);
+ sun_pci_ebus_dev = ebus->self;
+
sun_pci_fd_ebus_dma = (struct linux_ebus_dma *)
edev->resource[1].start;
sun_pci_fd_reset_dma();
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h
index 5dc5c88c6..37a1e847b 100644
--- a/include/asm-sparc64/io.h
+++ b/include/asm-sparc64/io.h
@@ -13,7 +13,7 @@
#define __SLOW_DOWN_IO do { } while (0)
#define SLOW_DOWN_IO do { } while (0)
-#undef NEW_PCI_DMA_MAP
+#define NEW_PCI_DMA_MAP
#ifndef NEW_PCI_DMA_MAP
#define PCI_DVMA_HASHSZ 256
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h
index 97aeaf7f6..5184ba51a 100644
--- a/include/asm-sparc64/parport.h
+++ b/include/asm-sparc64/parport.h
@@ -149,7 +149,7 @@ parport_pc_init(int *io, int *io_hi, int *irq, int *dma)
if (parport_pc_probe_port(base, base + 0x400,
edev->irqs[0],
- count))
+ count, ebus->self))
count++;
}
}
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h
index 4131b698f..881de6c2f 100644
--- a/include/asm-sparc64/pci.h
+++ b/include/asm-sparc64/pci.h
@@ -1,8 +1,6 @@
#ifndef __SPARC64_PCI_H
#define __SPARC64_PCI_H
-#include <asm/scatterlist.h>
-
/* Can be used to override the logic in pci_scan_bus for skipping
* already-configured bus numbers - to be used for buggy BIOSes
* or architectures with incomplete PCI setup by the loader.
@@ -12,32 +10,37 @@
#define PCIBIOS_MIN_IO 0UL
#define PCIBIOS_MIN_MEM 0UL
+#ifdef __KERNEL__
+
+/* Dynamic DMA mapping stuff.
+ */
+
+#include <asm/scatterlist.h>
+
struct pci_dev;
-/* Allocate and map kernel buffer using consistant mode DMA for PCI device.
- * Returns non-NULL cpu-view pointer to the buffer if successful and
- * sets *dma_addrp to the pci side dma address as well, else *dma_addrp
- * is undefined.
+/* Allocate and map kernel buffer using consistent mode DMA for a device.
+ * hwdev should be valid struct pci_dev pointer for PCI devices.
*/
-extern void *pci_alloc_consistant(struct pci_dev *pdev, long size, u32 *dma_addrp);
+extern void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle);
-/* Free and unmap a consistant DMA buffer.
- * cpu_addr is what was returned from pci_alloc_consistant,
- * size must be the same as what as passed into pci_alloc_consistant,
+/* Free and unmap a consistent DMA buffer.
+ * cpu_addr is what was returned from pci_alloc_consistent,
+ * size must be the same as what as passed into pci_alloc_consistent,
* and likewise dma_addr must be the same as what *dma_addrp was set to.
*
* References to the memory and mappings assosciated with cpu_addr/dma_addr
* past this call are illegal.
*/
-extern void pci_free_consistant(struct pci_dev *pdev, long size, void *cpu_addr, u32 dma_addr);
+extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle);
-/* Map a single buffer of the indicate size for PCI DMA in streaming mode.
- * The 32-bit PCI bus mastering address to use is returned.
+/* Map a single buffer of the indicated size for DMA in streaming mode.
+ * The 32-bit bus address to use is returned.
*
* Once the device is given the dma address, the device owns this memory
- * until either pci_unmap_single or pci_sync_single is performed.
+ * until either pci_unmap_single or pci_dma_sync_single is performed.
*/
-extern u32 pci_map_single(struct pci_dev *pdev, void *buffer, long size);
+extern dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size);
/* Unmap a single streaming mode DMA translation. The dma_addr and size
* must match what was provided for in a previous pci_map_single call. All
@@ -46,32 +49,32 @@ extern u32 pci_map_single(struct pci_dev *pdev, void *buffer, long size);
* After this call, reads by the cpu to the buffer are guarenteed to see
* whatever the device wrote there.
*/
-extern void pci_unmap_single(struct pci_dev *pdev, u32 dma_addr, long size);
+extern void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size);
/* Map a set of buffers described by scatterlist in streaming
- * mode for PCI DMA. This is the scather-gather version of the
+ * mode for DMA. This is the scather-gather version of the
* above pci_map_single interface. Here the scatter gather list
- * elements are each tagged with the appropriate PCI dma address
+ * elements are each tagged with the appropriate dma address
* and length. They are obtained via sg_dma_{address,length}(SG).
*
* NOTE: An implementation may be able to use a smaller number of
* DMA address/length pairs than there are SG table elements.
* (for example via virtual mapping capabilities)
- * The routine returns the number of addr/length pairs actually
- * used, at most nents.
+ * The routine returns the number of addr/length pairs actually
+ * used, at most nents.
*
* Device ownership issues as mentioned above for pci_map_single are
* the same here.
*/
-extern int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents);
+extern int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents);
/* Unmap a set of streaming mode DMA translations.
* Again, cpu read rules concerning calls here are the same as for
* pci_unmap_single() above.
*/
-extern void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents);
+extern void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nhwents);
-/* Make physical memory consistant for a single
+/* Make physical memory consistent for a single
* streaming mode DMA translation after a transfer.
*
* If you perform a pci_map_single() but wish to interrogate the
@@ -80,14 +83,16 @@ extern void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents
* next point you give the PCI dma address back to the card, the
* device again owns the buffer.
*/
-extern void pci_dma_sync_single(struct pci_dev *, u32, long);
+extern void pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size);
-/* Make physical memory consistant for a set of streaming
+/* Make physical memory consistent for a set of streaming
* mode DMA translations after a transfer.
*
* The same as pci_dma_sync_single but for a scatter-gather list,
* same rules and usage.
*/
-extern void pci_dma_sync_sg(struct pci_dev *, struct scatterlist *, int);
+extern void pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nelems);
+
+#endif /* __KERNEL__ */
#endif /* __SPARC64_PCI_H */
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
index 807dd0cf4..158fbbf39 100644
--- a/include/asm-sparc64/processor.h
+++ b/include/asm-sparc64/processor.h
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.60 2000/01/07 20:21:45 davem Exp $
+/* $Id: processor.h,v 1.61 2000/01/21 11:39:22 jj Exp $
* include/asm-sparc64/processor.h
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -56,16 +56,11 @@ struct thread_struct {
unsigned char __pad1[3];
struct pt_regs *kregs;
- /* D$ line 2 */
+ /* D$ line 2, 3, 4 */
unsigned long *utraps;
unsigned char gsr[7];
unsigned char __pad2;
- unsigned long sig_address;
- unsigned long sig_desc;
-
- /* D$ lines 3 and 4 */
unsigned long xfsr[7];
- unsigned long __pad3;
struct reg_window reg_window[NSWINS];
unsigned long rwbuf_stkptrs[NSWINS];
@@ -92,10 +87,8 @@ struct thread_struct {
0, 0, 0, 0, KERNEL_DS, \
/* w_saved, fpdepth, fpsaved, pad1, kregs, */ \
0, 0, { 0 }, { 0 }, 0, \
-/* utraps, gsr, pad2, sig_address, sig_desc, */ \
- 0, { 0 }, 0, 0, 0, \
-/* xfsr, pad3, */ \
- { 0 }, 0, \
+/* utraps, gsr, pad2, xfsr, */ \
+ 0, { 0 }, 0, { 0 }, \
/* reg_window */ \
{ { { 0, }, { 0, } }, }, \
/* rwbuf_stkptrs */ \
diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h
index 1718e234f..1b0b5137a 100644
--- a/include/asm-sparc64/sbus.h
+++ b/include/asm-sparc64/sbus.h
@@ -94,18 +94,18 @@ extern struct sbus_bus *sbus_root;
#define sbus_can_burst64(sdev) (1)
extern void sbus_set_sbus64(struct sbus_dev *, int);
-/* These yield IOMMU mappings in consistant mode. */
-extern void *sbus_alloc_consistant(struct sbus_dev *, long, u32 *dma_addrp);
-extern void sbus_free_consistant(struct sbus_dev *, long, void *, u32);
+/* These yield IOMMU mappings in consistent mode. */
+extern void *sbus_alloc_consistent(struct sbus_dev *, size_t, dma_addr_t *dma_addrp);
+extern void sbus_free_consistent(struct sbus_dev *, size_t, void *, dma_addr_t);
/* All the rest use streaming mode mappings. */
-extern u32 sbus_map_single(struct sbus_dev *, void *, long);
-extern void sbus_unmap_single(struct sbus_dev *, u32, long);
+extern dma_addr_t sbus_map_single(struct sbus_dev *, void *, size_t);
+extern void sbus_unmap_single(struct sbus_dev *, dma_addr_t, size_t);
extern int sbus_map_sg(struct sbus_dev *, struct scatterlist *, int);
extern void sbus_unmap_sg(struct sbus_dev *, struct scatterlist *, int);
/* Finally, allow explicit synchronization of streamable mappings. */
-extern void sbus_dma_sync_single(struct sbus_dev *, u32, long);
+extern void sbus_dma_sync_single(struct sbus_dev *, dma_addr_t, size_t);
extern void sbus_dma_sync_sg(struct sbus_dev *, struct scatterlist *, int);
#endif /* !(_SPARC64_SBUS_H) */
diff --git a/include/asm-sparc64/semaphore.h b/include/asm-sparc64/semaphore.h
index 046385d3c..1d7b0e31c 100644
--- a/include/asm-sparc64/semaphore.h
+++ b/include/asm-sparc64/semaphore.h
@@ -253,11 +253,18 @@ struct rw_semaphore {
#define __RWSEM_DEBUG_INIT /* */
#endif
-#define __RWSEM_INITIALIZER(name) \
-{ RW_LOCK_BIAS, 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
+#define __RWSEM_INITIALIZER(name,count) \
+{ (count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
__WAIT_QUEUE_HEAD_INITIALIZER((name).write_bias_wait) \
__SEM_DEBUG_INIT(name) __RWSEM_DEBUG_INIT }
+#define __DECLARE_RWSEM_GENERIC(name,count) \
+ struct rw_semaphore name = __RWSEM_INITIALIZER(name,count)
+
+#define DECLARE_RWSEM(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS)
+#define DECLARE_RWSEM_READ_LOCKED(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS-1)
+#define DECLARE_RWSEM_WRITE_LOCKED(name) __DECLARE_RWSEM_GENERIC(name,0)
+
extern inline void init_rwsem(struct rw_semaphore *sem)
{
sem->count = RW_LOCK_BIAS;
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
index 9e60d6015..ee7d80809 100644
--- a/include/asm-sparc64/siginfo.h
+++ b/include/asm-sparc64/siginfo.h
@@ -141,6 +141,11 @@ typedef struct siginfo32 {
#define si_band _sifields._sigpoll._band
#define si_fd _sifields._sigpoll._fd
+#ifdef __KERNEL__
+#define __SI_MASK 0
+#define __SI_FAULT 0
+#endif
+
/*
* si_code values
* Digital reserves positive values for kernel-generated signals.
@@ -187,7 +192,7 @@ typedef struct siginfo32 {
* SIGSEGV si_codes
*/
#define SEGV_MAPERR 1 /* address not mapped to object */
-#define SRGV_ACCERR 2 /* invalid permissions for mapped object */
+#define SEGV_ACCERR 2 /* invalid permissions for mapped object */
#define NSIGSEGV 2
/*
@@ -214,7 +219,7 @@ typedef struct siginfo32 {
#define CLD_TRAPPED 4 /* traced child has trapped */
#define CLD_STOPPED 5 /* child has stopped */
#define CLD_CONTINUED 6 /* stopped child has continued */
-#define NSIGCHLD
+#define NSIGCHLD 6
/*
* SIGPOLL si_codes
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
index 7cd66aa56..116fe903e 100644
--- a/include/asm-sparc64/smp.h
+++ b/include/asm-sparc64/smp.h
@@ -68,13 +68,17 @@ extern void smp_callin(void);
extern void smp_boot_cpus(void);
extern void smp_store_cpu_info(int id);
-extern __volatile__ int cpu_number_map[NR_CPUS];
+extern __volatile__ int __cpu_number_map[NR_CPUS];
extern __volatile__ int __cpu_logical_map[NR_CPUS];
extern __inline__ int cpu_logical_map(int cpu)
{
return __cpu_logical_map[cpu];
}
+extern __inline__ int cpu_number_map(int cpu)
+{
+ return __cpu_number_map[cpu];
+}
extern __inline__ int hard_smp_processor_id(void)
{
diff --git a/include/asm-sparc64/termbits.h b/include/asm-sparc64/termbits.h
index 6d490333c..faa32e785 100644
--- a/include/asm-sparc64/termbits.h
+++ b/include/asm-sparc64/termbits.h
@@ -204,6 +204,9 @@ struct termios {
#define TIOCM_DSR 0x100
#define TIOCM_CD TIOCM_CAR
#define TIOCM_RI TIOCM_RNG
+#define TIOCM_OUT1 0x2000
+#define TIOCM_OUT2 0x4000
+#define TIOCM_LOOP 0x8000
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h
index e96909af4..f8e42235c 100644
--- a/include/asm-sparc64/types.h
+++ b/include/asm-sparc64/types.h
@@ -45,6 +45,10 @@ typedef unsigned long u64;
#define BITS_PER_LONG 64
+/* Dma addresses are 32-bits wide for now. */
+
+typedef u32 dma_addr_t;
+
#endif /* __KERNEL__ */
#endif /* defined(_SPARC64_TYPES_H) */
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index 49c063d44..d1c874480 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.39 2000/01/11 17:34:05 jj Exp $ */
+/* $Id: unistd.h,v 1.40 2000/01/16 06:20:38 davem Exp $ */
#ifndef _SPARC64_UNISTD_H
#define _SPARC64_UNISTD_H