summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-24 00:12:35 +0000
commit482368b1a8e45430672c58c9a42e7d2004367126 (patch)
treece2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /include/asm-sparc
parente4d0251c6f56ab2e191afb70f80f382793e23f74 (diff)
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'include/asm-sparc')
-rw-r--r--include/asm-sparc/asm_offsets.h222
-rw-r--r--include/asm-sparc/hardirq.h4
-rw-r--r--include/asm-sparc/page.h16
-rw-r--r--include/asm-sparc/pci.h22
-rw-r--r--include/asm-sparc/pgtable.h18
-rw-r--r--include/asm-sparc/sbus.h23
6 files changed, 170 insertions, 135 deletions
diff --git a/include/asm-sparc/asm_offsets.h b/include/asm-sparc/asm_offsets.h
index 15f2d5093..3bbf39b20 100644
--- a/include/asm-sparc/asm_offsets.h
+++ b/include/asm-sparc/asm_offsets.h
@@ -79,113 +79,113 @@
#define AOFF_task_pidhash_pprev 0x00000094
#define ASIZ_task_pidhash_pprev 0x00000004
#define AOFF_task_wait_chldexit 0x00000098
-#define ASIZ_task_wait_chldexit 0x00000010
-#define AOFF_task_vfork_sem 0x000000a8
+#define ASIZ_task_wait_chldexit 0x00000014
+#define AOFF_task_vfork_sem 0x000000ac
#define ASIZ_task_vfork_sem 0x00000004
-#define AOFF_task_rt_priority 0x000000ac
+#define AOFF_task_rt_priority 0x000000b0
#define ASIZ_task_rt_priority 0x00000004
-#define AOFF_task_it_real_value 0x000000b0
+#define AOFF_task_it_real_value 0x000000b4
#define ASIZ_task_it_real_value 0x00000004
-#define AOFF_task_it_prof_value 0x000000b4
+#define AOFF_task_it_prof_value 0x000000b8
#define ASIZ_task_it_prof_value 0x00000004
-#define AOFF_task_it_virt_value 0x000000b8
+#define AOFF_task_it_virt_value 0x000000bc
#define ASIZ_task_it_virt_value 0x00000004
-#define AOFF_task_it_real_incr 0x000000bc
+#define AOFF_task_it_real_incr 0x000000c0
#define ASIZ_task_it_real_incr 0x00000004
-#define AOFF_task_it_prof_incr 0x000000c0
+#define AOFF_task_it_prof_incr 0x000000c4
#define ASIZ_task_it_prof_incr 0x00000004
-#define AOFF_task_it_virt_incr 0x000000c4
+#define AOFF_task_it_virt_incr 0x000000c8
#define ASIZ_task_it_virt_incr 0x00000004
-#define AOFF_task_real_timer 0x000000c8
-#define ASIZ_task_real_timer 0x00000014
-#define AOFF_task_times 0x000000dc
+#define AOFF_task_real_timer 0x000000cc
+#define ASIZ_task_real_timer 0x00000018
+#define AOFF_task_times 0x000000e4
#define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000ec
+#define AOFF_task_start_time 0x000000f4
#define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x000000f0
+#define AOFF_task_per_cpu_utime 0x000000f8
#define ASIZ_task_per_cpu_utime 0x00000004
-#define AOFF_task_min_flt 0x000000f8
+#define AOFF_task_min_flt 0x00000100
#define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x000000fc
+#define AOFF_task_maj_flt 0x00000104
#define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x00000100
+#define AOFF_task_nswap 0x00000108
#define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x00000104
+#define AOFF_task_cmin_flt 0x0000010c
#define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x00000108
+#define AOFF_task_cmaj_flt 0x00000110
#define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x0000010c
+#define AOFF_task_cnswap 0x00000114
#define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x00000114
+#define AOFF_task_uid 0x0000011c
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000118
+#define AOFF_task_euid 0x00000120
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x0000011c
+#define AOFF_task_suid 0x00000124
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x00000120
+#define AOFF_task_fsuid 0x00000128
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x00000124
+#define AOFF_task_gid 0x0000012c
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000128
+#define AOFF_task_egid 0x00000130
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x0000012c
+#define AOFF_task_sgid 0x00000134
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x00000130
+#define AOFF_task_fsgid 0x00000138
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x00000134
+#define AOFF_task_ngroups 0x0000013c
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000138
+#define AOFF_task_groups 0x00000140
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000001b8
+#define AOFF_task_cap_effective 0x000001c0
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000001bc
+#define AOFF_task_cap_inheritable 0x000001c4
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000001c0
+#define AOFF_task_cap_permitted 0x000001c8
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000001c4
+#define AOFF_task_user 0x000001cc
#define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x000001c8
+#define AOFF_task_rlim 0x000001d0
#define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x00000218
+#define AOFF_task_used_math 0x00000220
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000021a
+#define AOFF_task_comm 0x00000222
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000022c
+#define AOFF_task_link_count 0x00000234
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000230
+#define AOFF_task_tty 0x00000238
#define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x00000234
+#define AOFF_task_semundo 0x0000023c
#define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x00000238
+#define AOFF_task_semsleeping 0x00000240
#define ASIZ_task_semsleeping 0x00000004
-#define AOFF_task_thread 0x00000240
+#define AOFF_task_thread 0x00000248
#define ASIZ_task_thread 0x00000380
-#define AOFF_task_fs 0x000005c0
+#define AOFF_task_fs 0x000005c8
#define ASIZ_task_fs 0x00000004
-#define AOFF_task_files 0x000005c4
+#define AOFF_task_files 0x000005cc
#define ASIZ_task_files 0x00000004
-#define AOFF_task_sigmask_lock 0x000005c8
-#define ASIZ_task_sigmask_lock 0x00000000
-#define AOFF_task_sig 0x000005c8
+#define AOFF_task_sigmask_lock 0x000005d0
+#define ASIZ_task_sigmask_lock 0x00000004
+#define AOFF_task_sig 0x000005d4
#define ASIZ_task_sig 0x00000004
-#define AOFF_task_signal 0x000005cc
+#define AOFF_task_signal 0x000005d8
#define ASIZ_task_signal 0x00000008
-#define AOFF_task_blocked 0x000005d4
+#define AOFF_task_blocked 0x000005e0
#define ASIZ_task_blocked 0x00000008
-#define AOFF_task_sigqueue 0x000005dc
+#define AOFF_task_sigqueue 0x000005e8
#define ASIZ_task_sigqueue 0x00000004
-#define AOFF_task_sigqueue_tail 0x000005e0
+#define AOFF_task_sigqueue_tail 0x000005ec
#define ASIZ_task_sigqueue_tail 0x00000004
-#define AOFF_task_sas_ss_sp 0x000005e4
+#define AOFF_task_sas_ss_sp 0x000005f0
#define ASIZ_task_sas_ss_sp 0x00000004
-#define AOFF_task_sas_ss_size 0x000005e8
+#define AOFF_task_sas_ss_size 0x000005f4
#define ASIZ_task_sas_ss_size 0x00000004
-#define AOFF_task_parent_exec_id 0x000005ec
+#define AOFF_task_parent_exec_id 0x000005f8
#define ASIZ_task_parent_exec_id 0x00000004
-#define AOFF_task_self_exec_id 0x000005f0
+#define AOFF_task_self_exec_id 0x000005fc
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_exit_sem 0x000005f4
-#define ASIZ_task_exit_sem 0x0000001c
+#define AOFF_task_exit_sem 0x00000600
+#define ASIZ_task_exit_sem 0x00000020
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000004
#define AOFF_mm_mmap_avl 0x00000004
@@ -201,48 +201,48 @@
#define AOFF_mm_map_count 0x00000018
#define ASIZ_mm_map_count 0x00000004
#define AOFF_mm_mmap_sem 0x0000001c
-#define ASIZ_mm_mmap_sem 0x0000001c
-#define AOFF_mm_page_table_lock 0x00000038
-#define ASIZ_mm_page_table_lock 0x00000000
-#define AOFF_mm_context 0x00000038
+#define ASIZ_mm_mmap_sem 0x00000020
+#define AOFF_mm_page_table_lock 0x0000003c
+#define ASIZ_mm_page_table_lock 0x00000004
+#define AOFF_mm_context 0x00000040
#define ASIZ_mm_context 0x00000004
-#define AOFF_mm_start_code 0x0000003c
+#define AOFF_mm_start_code 0x00000044
#define ASIZ_mm_start_code 0x00000004
-#define AOFF_mm_end_code 0x00000040
+#define AOFF_mm_end_code 0x00000048
#define ASIZ_mm_end_code 0x00000004
-#define AOFF_mm_start_data 0x00000044
+#define AOFF_mm_start_data 0x0000004c
#define ASIZ_mm_start_data 0x00000004
-#define AOFF_mm_end_data 0x00000048
+#define AOFF_mm_end_data 0x00000050
#define ASIZ_mm_end_data 0x00000004
-#define AOFF_mm_start_brk 0x0000004c
+#define AOFF_mm_start_brk 0x00000054
#define ASIZ_mm_start_brk 0x00000004
-#define AOFF_mm_brk 0x00000050
+#define AOFF_mm_brk 0x00000058
#define ASIZ_mm_brk 0x00000004
-#define AOFF_mm_start_stack 0x00000054
+#define AOFF_mm_start_stack 0x0000005c
#define ASIZ_mm_start_stack 0x00000004
-#define AOFF_mm_arg_start 0x00000058
+#define AOFF_mm_arg_start 0x00000060
#define ASIZ_mm_arg_start 0x00000004
-#define AOFF_mm_arg_end 0x0000005c
+#define AOFF_mm_arg_end 0x00000064
#define ASIZ_mm_arg_end 0x00000004
-#define AOFF_mm_env_start 0x00000060
+#define AOFF_mm_env_start 0x00000068
#define ASIZ_mm_env_start 0x00000004
-#define AOFF_mm_env_end 0x00000064
+#define AOFF_mm_env_end 0x0000006c
#define ASIZ_mm_env_end 0x00000004
-#define AOFF_mm_rss 0x00000068
+#define AOFF_mm_rss 0x00000070
#define ASIZ_mm_rss 0x00000004
-#define AOFF_mm_total_vm 0x0000006c
+#define AOFF_mm_total_vm 0x00000074
#define ASIZ_mm_total_vm 0x00000004
-#define AOFF_mm_locked_vm 0x00000070
+#define AOFF_mm_locked_vm 0x00000078
#define ASIZ_mm_locked_vm 0x00000004
-#define AOFF_mm_def_flags 0x00000074
+#define AOFF_mm_def_flags 0x0000007c
#define ASIZ_mm_def_flags 0x00000004
-#define AOFF_mm_cpu_vm_mask 0x00000078
+#define AOFF_mm_cpu_vm_mask 0x00000080
#define ASIZ_mm_cpu_vm_mask 0x00000004
-#define AOFF_mm_swap_cnt 0x0000007c
+#define AOFF_mm_swap_cnt 0x00000084
#define ASIZ_mm_swap_cnt 0x00000004
-#define AOFF_mm_swap_address 0x00000080
+#define AOFF_mm_swap_address 0x00000088
#define ASIZ_mm_swap_address 0x00000004
-#define AOFF_mm_segments 0x00000084
+#define AOFF_mm_segments 0x0000008c
#define ASIZ_mm_segments 0x00000004
#define AOFF_thread_uwinmask 0x00000000
#define ASIZ_thread_uwinmask 0x00000004
@@ -378,66 +378,66 @@
#define AOFF_task_it_virt_incr 0x000000cc
#define ASIZ_task_it_virt_incr 0x00000004
#define AOFF_task_real_timer 0x000000d0
-#define ASIZ_task_real_timer 0x00000014
-#define AOFF_task_times 0x000000e4
+#define ASIZ_task_real_timer 0x00000018
+#define AOFF_task_times 0x000000e8
#define ASIZ_task_times 0x00000010
-#define AOFF_task_start_time 0x000000f4
+#define AOFF_task_start_time 0x000000f8
#define ASIZ_task_start_time 0x00000004
-#define AOFF_task_per_cpu_utime 0x000000f8
+#define AOFF_task_per_cpu_utime 0x000000fc
#define ASIZ_task_per_cpu_utime 0x00000080
-#define AOFF_task_min_flt 0x000001f8
+#define AOFF_task_min_flt 0x000001fc
#define ASIZ_task_min_flt 0x00000004
-#define AOFF_task_maj_flt 0x000001fc
+#define AOFF_task_maj_flt 0x00000200
#define ASIZ_task_maj_flt 0x00000004
-#define AOFF_task_nswap 0x00000200
+#define AOFF_task_nswap 0x00000204
#define ASIZ_task_nswap 0x00000004
-#define AOFF_task_cmin_flt 0x00000204
+#define AOFF_task_cmin_flt 0x00000208
#define ASIZ_task_cmin_flt 0x00000004
-#define AOFF_task_cmaj_flt 0x00000208
+#define AOFF_task_cmaj_flt 0x0000020c
#define ASIZ_task_cmaj_flt 0x00000004
-#define AOFF_task_cnswap 0x0000020c
+#define AOFF_task_cnswap 0x00000210
#define ASIZ_task_cnswap 0x00000004
-#define AOFF_task_uid 0x00000214
+#define AOFF_task_uid 0x00000218
#define ASIZ_task_uid 0x00000004
-#define AOFF_task_euid 0x00000218
+#define AOFF_task_euid 0x0000021c
#define ASIZ_task_euid 0x00000004
-#define AOFF_task_suid 0x0000021c
+#define AOFF_task_suid 0x00000220
#define ASIZ_task_suid 0x00000004
-#define AOFF_task_fsuid 0x00000220
+#define AOFF_task_fsuid 0x00000224
#define ASIZ_task_fsuid 0x00000004
-#define AOFF_task_gid 0x00000224
+#define AOFF_task_gid 0x00000228
#define ASIZ_task_gid 0x00000004
-#define AOFF_task_egid 0x00000228
+#define AOFF_task_egid 0x0000022c
#define ASIZ_task_egid 0x00000004
-#define AOFF_task_sgid 0x0000022c
+#define AOFF_task_sgid 0x00000230
#define ASIZ_task_sgid 0x00000004
-#define AOFF_task_fsgid 0x00000230
+#define AOFF_task_fsgid 0x00000234
#define ASIZ_task_fsgid 0x00000004
-#define AOFF_task_ngroups 0x00000234
+#define AOFF_task_ngroups 0x00000238
#define ASIZ_task_ngroups 0x00000004
-#define AOFF_task_groups 0x00000238
+#define AOFF_task_groups 0x0000023c
#define ASIZ_task_groups 0x00000080
-#define AOFF_task_cap_effective 0x000002b8
+#define AOFF_task_cap_effective 0x000002bc
#define ASIZ_task_cap_effective 0x00000004
-#define AOFF_task_cap_inheritable 0x000002bc
+#define AOFF_task_cap_inheritable 0x000002c0
#define ASIZ_task_cap_inheritable 0x00000004
-#define AOFF_task_cap_permitted 0x000002c0
+#define AOFF_task_cap_permitted 0x000002c4
#define ASIZ_task_cap_permitted 0x00000004
-#define AOFF_task_user 0x000002c4
+#define AOFF_task_user 0x000002c8
#define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x000002c8
+#define AOFF_task_rlim 0x000002cc
#define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math 0x00000318
+#define AOFF_task_used_math 0x0000031c
#define ASIZ_task_used_math 0x00000002
-#define AOFF_task_comm 0x0000031a
+#define AOFF_task_comm 0x0000031e
#define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count 0x0000032c
+#define AOFF_task_link_count 0x00000330
#define ASIZ_task_link_count 0x00000004
-#define AOFF_task_tty 0x00000330
+#define AOFF_task_tty 0x00000334
#define ASIZ_task_tty 0x00000004
-#define AOFF_task_semundo 0x00000334
+#define AOFF_task_semundo 0x00000338
#define ASIZ_task_semundo 0x00000004
-#define AOFF_task_semsleeping 0x00000338
+#define AOFF_task_semsleeping 0x0000033c
#define ASIZ_task_semsleeping 0x00000004
#define AOFF_task_thread 0x00000340
#define ASIZ_task_thread 0x00000380
diff --git a/include/asm-sparc/hardirq.h b/include/asm-sparc/hardirq.h
index 56fe88bba..bbe134c28 100644
--- a/include/asm-sparc/hardirq.h
+++ b/include/asm-sparc/hardirq.h
@@ -18,8 +18,8 @@ extern unsigned int local_irq_count;
*/
#define in_interrupt() ((local_irq_count + local_bh_count) != 0)
-#define hardirq_trylock(cpu) (local_irq_count == 0)
-#define hardirq_endlock(cpu) do { } while (0)
+#define hardirq_trylock(cpu) ((void)(cpu), local_irq_count == 0)
+#define hardirq_endlock(cpu) do { (void)(cpu); } while (0)
#define hardirq_enter(cpu) (local_irq_count++)
#define hardirq_exit(cpu) (local_irq_count--)
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h
index 344640811..3c61eb636 100644
--- a/include/asm-sparc/page.h
+++ b/include/asm-sparc/page.h
@@ -1,4 +1,4 @@
-/* $Id: page.h,v 1.47 2000/01/29 00:41:49 anton Exp $
+/* $Id: page.h,v 1.48 2000/02/16 07:34:51 davem Exp $
* page.h: Various defines and such for MMU operations on the Sparc for
* the Linux kernel.
*
@@ -129,6 +129,20 @@ BTFIXUPDEF_SETHI(sparc_unmapped_base)
#define TASK_UNMAPPED_BASE BTFIXUP_SETHI(sparc_unmapped_base)
+/* Pure 2^n version of get_order */
+extern __inline__ int get_order(unsigned long size)
+{
+ int order;
+
+ size = (size-1) >> (PAGE_SHIFT-1);
+ order = -1;
+ do {
+ size >>= 1;
+ order++;
+ } while (size);
+ return order;
+}
+
#else /* !(__ASSEMBLY__) */
#define __pgprot(x) (x)
diff --git a/include/asm-sparc/pci.h b/include/asm-sparc/pci.h
index a2749a907..80ea9d11d 100644
--- a/include/asm-sparc/pci.h
+++ b/include/asm-sparc/pci.h
@@ -40,7 +40,7 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr,
* Once the device is given the dma address, the device owns this memory
* until either pci_unmap_single or pci_dma_sync_single is performed.
*/
-extern dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size);
+extern dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction);
/* 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
@@ -49,7 +49,7 @@ extern dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t 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 *hwdev, dma_addr_t dma_addr, size_t size);
+extern void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction);
/* Map a set of buffers described by scatterlist in streaming
* mode for DMA. This is the scather-gather version of the
@@ -66,13 +66,13 @@ extern void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t
* Device ownership issues as mentioned above for pci_map_single are
* the same here.
*/
-extern int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents);
+extern int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction);
/* 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 *hwdev, struct scatterlist *sg, int nhwents);
+extern void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nhwents, int direction);
/* Make physical memory consistent for a single
* streaming mode DMA translation after a transfer.
@@ -83,7 +83,7 @@ extern void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nhwe
* 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 *hwdev, dma_addr_t dma_handle, size_t size);
+extern void pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction);
/* Make physical memory consistent for a set of streaming
* mode DMA translations after a transfer.
@@ -91,7 +91,17 @@ extern void pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_handle, si
* 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 *hwdev, struct scatterlist *sg, int nelems);
+extern void pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction);
+
+/* 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;
+}
#endif /* __KERNEL__ */
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h
index 8829d323c..6899b49cd 100644
--- a/include/asm-sparc/pgtable.h
+++ b/include/asm-sparc/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.88 2000/02/06 22:56:09 zaitcev Exp $ */
+/* $Id: pgtable.h,v 1.91 2000/02/16 08:44:52 anton Exp $ */
#ifndef _SPARC_PGTABLE_H
#define _SPARC_PGTABLE_H
@@ -327,15 +327,16 @@ extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot)
pgprot_val(newprot));
}
-BTFIXUPDEF_CALL(pgd_t *, pgd_offset, struct mm_struct *, unsigned long)
-BTFIXUPDEF_CALL(pmd_t *, pmd_offset, pgd_t *, unsigned long)
-BTFIXUPDEF_CALL(pte_t *, pte_offset, pmd_t *, unsigned long)
+#define pgd_index(address) ((address) >> PGDIR_SHIFT)
+
+/* to find an entry in a page-table-directory */
+#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
/* to find an entry in a kernel page-table-directory */
#define pgd_offset_k(address) pgd_offset(&init_mm, address)
-/* to find an entry in a page-table-directory */
-#define pgd_offset(mm,addr) BTFIXUP_CALL(pgd_offset)(mm,addr)
+BTFIXUPDEF_CALL(pmd_t *, pmd_offset, pgd_t *, unsigned long)
+BTFIXUPDEF_CALL(pte_t *, pte_offset, pmd_t *, unsigned long)
/* Find an entry in the second-level page table.. */
#define pmd_offset(dir,addr) BTFIXUP_CALL(pmd_offset)(dir,addr)
@@ -346,6 +347,8 @@ BTFIXUPDEF_CALL(pte_t *, pte_offset, pmd_t *, unsigned long)
/* The permissions for pgprot_val to make a page mapped on the obio space */
extern unsigned int pg_iobits;
+#define flush_icache_page(vma, pg) do { } while(0)
+
/* Certain architectures need to do special things when pte's
* within a page table are directly modified. Thus, the following
* hook is made available.
@@ -448,4 +451,7 @@ extern int io_remap_page_range(unsigned long from, unsigned long to,
#endif /* !(__ASSEMBLY__) */
+/* We provide our own get_unmapped_area to cope with VA holes for userland */
+#define HAVE_ARCH_UNMAPPED_AREA
+
#endif /* !(_SPARC_PGTABLE_H) */
diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h
index b7f2b8f9e..6a687a465 100644
--- a/include/asm-sparc/sbus.h
+++ b/include/asm-sparc/sbus.h
@@ -1,4 +1,4 @@
-/* $Id: sbus.h,v 1.21 2000/01/28 13:43:11 jj Exp $
+/* $Id: sbus.h,v 1.22 2000/02/18 13:50:50 davem Exp $
* sbus.h: Defines for the Sun SBus.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -97,22 +97,27 @@ sbus_is_slave(struct sbus_dev *dev)
for((bus) = sbus_root, ((device) = (bus) ? (bus)->devices : 0); (bus); (device)=((device)->next ? (device)->next : ((bus) = (bus)->next, (bus) ? (bus)->devices : 0)))
/* Driver DVMA interfaces. */
-#define sbus_can_dma_64bit(sdev) (1)
-#define sbus_can_burst64(sdev) (1)
+#define sbus_can_dma_64bit(sdev) (0) /* actually, sparc_cpu_model==sun4d */
+#define sbus_can_burst64(sdev) (0) /* actually, sparc_cpu_model==sun4d */
extern void sbus_set_sbus64(struct sbus_dev *, int);
/* These yield IOMMU mappings in consistent mode. */
extern void *sbus_alloc_consistent(struct sbus_dev *, long, u32 *dma_addrp);
extern void sbus_free_consistent(struct sbus_dev *, long, void *, u32);
+#define SBUS_DMA_BIDIRECTIONAL 0
+#define SBUS_DMA_TODEVICE 1
+#define SBUS_DMA_FROMDEVICE 2
+#define SBUS_DMA_NONE 3
+
/* 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 int sbus_map_sg(struct sbus_dev *, struct scatterlist *, int);
-extern void sbus_unmap_sg(struct sbus_dev *, struct scatterlist *, int);
+extern u32 sbus_map_single(struct sbus_dev *, void *, long, int);
+extern void sbus_unmap_single(struct sbus_dev *, u32, long, int);
+extern int sbus_map_sg(struct sbus_dev *, struct scatterlist *, int, int);
+extern void sbus_unmap_sg(struct sbus_dev *, struct scatterlist *, int, int);
/* Finally, allow explicit synchronization of streamable mappings. */
-extern void sbus_dma_sync_single(struct sbus_dev *, u32, long);
-extern void sbus_dma_sync_sg(struct sbus_dev *, struct scatterlist *, int);
+extern void sbus_dma_sync_single(struct sbus_dev *, u32, long, int);
+extern void sbus_dma_sync_sg(struct sbus_dev *, struct scatterlist *, int, int);
#endif /* !(_SPARC_SBUS_H) */