diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:29:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:29:04 -0400 |
commit | 0278ef8b484a71917bd4f03a763285cdaac10954 (patch) | |
tree | 8f6f7bf2e2a85b4643dfe3d0475811ce858fb4fc /include | |
parent | 15c54033964a943de7b0763efd3bd0ede7326395 (diff) | |
parent | cd9ad58d4061494e7fdd70ded7bcf2418daf356a (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (67 commits)
[SCSI] SUNESP: Complete driver rewrite to version 2.0
[SPARC64]: Convert PCI over to generic struct iommu/strbuf.
[SPARC]: device_node name constification fallout
[SPARC64]: Convert SBUS over to generic iommu/strbuf structs.
[SPARC64]: Add generic iommu and strbuf structs to iommu.h
[SPARC64]: Consolidate {sbus,pci}_iommu_arena.
[SPARC]: Make device_node name and type const
[SPARC64]: constify some paramaters of OF routines
[TIGON3]: of_get_property() returns const.
[SPARC64]: Fix PCI rework to adhere to of_get_property() const return.
[SPARC64]: Document and fix calculation of pages_avail.
[SPARC64]: Make sure pbm->prom_node is setup easly enough in psycho.c
[SPARC64]: Use bootmem_bootmap_pages() in choose_bootmap_pfn().
[SPARC64]: Add proper header file extern for cmdline_memory_size.
[SPARC64]: Kill sparc_ultra_dump_{i,d}tlb()
[SPARC64]: Use DECLARE_BITMAP and BITS_TO_LONGS in mm/init.c
[SPARC64]: Give move verbose show_mem() output just like i386.
[SPARC64]: Mark show_mem() printk's with KERN_INFO.
[SPARC64]: Kill kvaddr_to_phys() and friends.
[SPARC64]: Privatize sun4u_get_pte() and fix name.
...
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/string.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/string.h | 2 | ||||
-rw-r--r-- | include/asm-sh/string.h | 3 | ||||
-rw-r--r-- | include/asm-sparc/prom.h | 14 | ||||
-rw-r--r-- | include/asm-sparc64/cpudata.h | 4 | ||||
-rw-r--r-- | include/asm-sparc64/device.h | 18 | ||||
-rw-r--r-- | include/asm-sparc64/ebus.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/floppy.h | 4 | ||||
-rw-r--r-- | include/asm-sparc64/io.h | 8 | ||||
-rw-r--r-- | include/asm-sparc64/iommu.h | 51 | ||||
-rw-r--r-- | include/asm-sparc64/isa.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/parport.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/pbm.h | 132 | ||||
-rw-r--r-- | include/asm-sparc64/pci.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/pgtable.h | 16 | ||||
-rw-r--r-- | include/asm-sparc64/prom.h | 12 | ||||
-rw-r--r-- | include/asm-sparc64/smp.h | 4 | ||||
-rw-r--r-- | include/asm-sparc64/sparsemem.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/timer.h | 17 | ||||
-rw-r--r-- | include/asm-sparc64/ttable.h | 27 | ||||
-rw-r--r-- | include/linux/string.h | 6 |
21 files changed, 106 insertions, 224 deletions
diff --git a/include/asm-alpha/string.h b/include/asm-alpha/string.h index 9e44fea669bf..b02b8a282940 100644 --- a/include/asm-alpha/string.h +++ b/include/asm-alpha/string.h | |||
@@ -61,8 +61,6 @@ extern void * __memsetw(void *dest, unsigned short, size_t count); | |||
61 | ? __constant_c_memset((s),0x0001000100010001UL*(unsigned short)(c),(n)) \ | 61 | ? __constant_c_memset((s),0x0001000100010001UL*(unsigned short)(c),(n)) \ |
62 | : __memsetw((s),(c),(n))) | 62 | : __memsetw((s),(c),(n))) |
63 | 63 | ||
64 | extern int strcasecmp(const char *, const char *); | ||
65 | |||
66 | #endif /* __KERNEL__ */ | 64 | #endif /* __KERNEL__ */ |
67 | 65 | ||
68 | #endif /* __ALPHA_STRING_H__ */ | 66 | #endif /* __ALPHA_STRING_H__ */ |
diff --git a/include/asm-powerpc/string.h b/include/asm-powerpc/string.h index faa407f33c6b..aa40f92c298d 100644 --- a/include/asm-powerpc/string.h +++ b/include/asm-powerpc/string.h | |||
@@ -14,8 +14,6 @@ | |||
14 | #define __HAVE_ARCH_MEMCMP | 14 | #define __HAVE_ARCH_MEMCMP |
15 | #define __HAVE_ARCH_MEMCHR | 15 | #define __HAVE_ARCH_MEMCHR |
16 | 16 | ||
17 | extern int strcasecmp(const char *, const char *); | ||
18 | extern int strncasecmp(const char *, const char *, __kernel_size_t); | ||
19 | extern char * strcpy(char *,const char *); | 17 | extern char * strcpy(char *,const char *); |
20 | extern char * strncpy(char *,const char *, __kernel_size_t); | 18 | extern char * strncpy(char *,const char *, __kernel_size_t); |
21 | extern __kernel_size_t strlen(const char *); | 19 | extern __kernel_size_t strlen(const char *); |
diff --git a/include/asm-sh/string.h b/include/asm-sh/string.h index 95bc7db006b0..55f8db6bc1d7 100644 --- a/include/asm-sh/string.h +++ b/include/asm-sh/string.h | |||
@@ -126,9 +126,6 @@ extern void *memchr(const void *__s, int __c, size_t __n); | |||
126 | #define __HAVE_ARCH_STRLEN | 126 | #define __HAVE_ARCH_STRLEN |
127 | extern size_t strlen(const char *); | 127 | extern size_t strlen(const char *); |
128 | 128 | ||
129 | /* arch/sh/lib/strcasecmp.c */ | ||
130 | extern int strcasecmp(const char *, const char *); | ||
131 | |||
132 | #endif /* __KERNEL__ */ | 129 | #endif /* __KERNEL__ */ |
133 | 130 | ||
134 | #endif /* __ASM_SH_STRING_H */ | 131 | #endif /* __ASM_SH_STRING_H */ |
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index 274868d8598d..9ea105ebe2ff 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h | |||
@@ -35,8 +35,8 @@ struct property { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | struct device_node { | 37 | struct device_node { |
38 | char *name; | 38 | const char *name; |
39 | char *type; | 39 | const char *type; |
40 | phandle node; | 40 | phandle node; |
41 | char *path_component_name; | 41 | char *path_component_name; |
42 | char *full_name; | 42 | char *full_name; |
@@ -85,12 +85,14 @@ extern struct device_node *of_find_node_by_phandle(phandle handle); | |||
85 | extern struct device_node *of_get_parent(const struct device_node *node); | 85 | extern struct device_node *of_get_parent(const struct device_node *node); |
86 | extern struct device_node *of_get_next_child(const struct device_node *node, | 86 | extern struct device_node *of_get_next_child(const struct device_node *node, |
87 | struct device_node *prev); | 87 | struct device_node *prev); |
88 | extern struct property *of_find_property(struct device_node *np, | 88 | extern struct property *of_find_property(const struct device_node *np, |
89 | const char *name, | 89 | const char *name, |
90 | int *lenp); | 90 | int *lenp); |
91 | extern int of_device_is_compatible(struct device_node *device, const char *); | 91 | extern int of_device_is_compatible(const struct device_node *device, |
92 | extern void *of_get_property(struct device_node *node, const char *name, | 92 | const char *); |
93 | int *lenp); | 93 | extern const void *of_get_property(const struct device_node *node, |
94 | const char *name, | ||
95 | int *lenp); | ||
94 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) | 96 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) |
95 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 97 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
96 | extern int of_getintprop_default(struct device_node *np, | 98 | extern int of_getintprop_default(struct device_node *np, |
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h index f2cc9411b4c7..e89922d6718c 100644 --- a/include/asm-sparc64/cpudata.h +++ b/include/asm-sparc64/cpudata.h | |||
@@ -17,8 +17,8 @@ | |||
17 | typedef struct { | 17 | typedef struct { |
18 | /* Dcache line 1 */ | 18 | /* Dcache line 1 */ |
19 | unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ | 19 | unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ |
20 | unsigned int multiplier; | 20 | unsigned int __pad0_1; |
21 | unsigned int counter; | 21 | unsigned int __pad0_2; |
22 | unsigned int __pad1; | 22 | unsigned int __pad1; |
23 | unsigned long clock_tick; /* %tick's per second */ | 23 | unsigned long clock_tick; /* %tick's per second */ |
24 | unsigned long udelay_val; | 24 | unsigned long udelay_val; |
diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h index d8f9872b0e2d..d5a4559b9555 100644 --- a/include/asm-sparc64/device.h +++ b/include/asm-sparc64/device.h | |||
@@ -3,5 +3,21 @@ | |||
3 | * | 3 | * |
4 | * This file is released under the GPLv2 | 4 | * This file is released under the GPLv2 |
5 | */ | 5 | */ |
6 | #include <asm-generic/device.h> | 6 | #ifndef _ASM_SPARC64_DEVICE_H |
7 | #define _ASM_SPARC64_DEVICE_H | ||
7 | 8 | ||
9 | struct device_node; | ||
10 | struct of_device; | ||
11 | |||
12 | struct dev_archdata { | ||
13 | void *iommu; | ||
14 | void *stc; | ||
15 | void *host_controller; | ||
16 | |||
17 | struct device_node *prom_node; | ||
18 | struct of_device *op; | ||
19 | |||
20 | unsigned int msi_num; | ||
21 | }; | ||
22 | |||
23 | #endif /* _ASM_SPARC64_DEVICE_H */ | ||
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h index a4afe9d5703a..9c1c6db2a790 100644 --- a/include/asm-sparc64/ebus.h +++ b/include/asm-sparc64/ebus.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #ifndef __SPARC64_EBUS_H | 8 | #ifndef __SPARC64_EBUS_H |
9 | #define __SPARC64_EBUS_H | 9 | #define __SPARC64_EBUS_H |
10 | 10 | ||
11 | #include <asm/pbm.h> | ||
12 | #include <asm/oplib.h> | 11 | #include <asm/oplib.h> |
13 | #include <asm/prom.h> | 12 | #include <asm/prom.h> |
14 | #include <asm/of_device.h> | 13 | #include <asm/of_device.h> |
@@ -41,7 +40,6 @@ struct linux_ebus { | |||
41 | struct of_device ofdev; | 40 | struct of_device ofdev; |
42 | struct linux_ebus *next; | 41 | struct linux_ebus *next; |
43 | struct linux_ebus_device *devices; | 42 | struct linux_ebus_device *devices; |
44 | struct pci_pbm_info *parent; | ||
45 | struct pci_dev *self; | 43 | struct pci_dev *self; |
46 | int index; | 44 | int index; |
47 | int is_rio; | 45 | int is_rio; |
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h index 331013a0053e..4aa0925e1b1b 100644 --- a/include/asm-sparc64/floppy.h +++ b/include/asm-sparc64/floppy.h | |||
@@ -549,7 +549,7 @@ static int __init ebus_fdthree_p(struct linux_ebus_device *edev) | |||
549 | if (!strcmp(edev->prom_node->name, "fdthree")) | 549 | if (!strcmp(edev->prom_node->name, "fdthree")) |
550 | return 1; | 550 | return 1; |
551 | if (!strcmp(edev->prom_node->name, "floppy")) { | 551 | if (!strcmp(edev->prom_node->name, "floppy")) { |
552 | char *compat; | 552 | const char *compat; |
553 | 553 | ||
554 | compat = of_get_property(edev->prom_node, | 554 | compat = of_get_property(edev->prom_node, |
555 | "compatible", NULL); | 555 | "compatible", NULL); |
@@ -661,7 +661,7 @@ static unsigned long __init sun_floppy_init(void) | |||
661 | struct linux_ebus_device *edev = NULL; | 661 | struct linux_ebus_device *edev = NULL; |
662 | unsigned long config = 0; | 662 | unsigned long config = 0; |
663 | void __iomem *auxio_reg; | 663 | void __iomem *auxio_reg; |
664 | char *state_prop; | 664 | const char *state_prop; |
665 | 665 | ||
666 | for_each_ebus(ebus) { | 666 | for_each_ebus(ebus) { |
667 | for_each_ebusdev(edev, ebus) { | 667 | for_each_ebusdev(edev, ebus) { |
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index 30b912d8e8bc..ad595b679842 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -24,14 +24,6 @@ extern unsigned long kern_base, kern_size; | |||
24 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 24 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
25 | #define BIO_VMERGE_BOUNDARY 8192 | 25 | #define BIO_VMERGE_BOUNDARY 8192 |
26 | 26 | ||
27 | /* Different PCI controllers we support have their PCI MEM space | ||
28 | * mapped to an either 2GB (Psycho) or 4GB (Sabre) aligned area, | ||
29 | * so need to chop off the top 33 or 32 bits. | ||
30 | */ | ||
31 | extern unsigned long pci_memspace_mask; | ||
32 | |||
33 | #define bus_dvma_to_mem(__vaddr) ((__vaddr) & pci_memspace_mask) | ||
34 | |||
35 | static __inline__ u8 _inb(unsigned long addr) | 27 | static __inline__ u8 _inb(unsigned long addr) |
36 | { | 28 | { |
37 | u8 ret; | 29 | u8 ret; |
diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h index 0de7a3da79cd..e199594a1e9b 100644 --- a/include/asm-sparc64/iommu.h +++ b/include/asm-sparc64/iommu.h | |||
@@ -7,15 +7,50 @@ | |||
7 | #define _SPARC64_IOMMU_H | 7 | #define _SPARC64_IOMMU_H |
8 | 8 | ||
9 | /* The format of an iopte in the page tables. */ | 9 | /* The format of an iopte in the page tables. */ |
10 | #define IOPTE_VALID 0x8000000000000000UL /* IOPTE is valid */ | 10 | #define IOPTE_VALID 0x8000000000000000UL |
11 | #define IOPTE_64K 0x2000000000000000UL /* IOPTE is for 64k page */ | 11 | #define IOPTE_64K 0x2000000000000000UL |
12 | #define IOPTE_STBUF 0x1000000000000000UL /* DVMA can use streaming buffer */ | 12 | #define IOPTE_STBUF 0x1000000000000000UL |
13 | #define IOPTE_INTRA 0x0800000000000000UL /* SBUS slot-->slot direct transfer*/ | 13 | #define IOPTE_INTRA 0x0800000000000000UL |
14 | #define IOPTE_CONTEXT 0x07ff800000000000UL /* Context number */ | 14 | #define IOPTE_CONTEXT 0x07ff800000000000UL |
15 | #define IOPTE_PAGE 0x00007fffffffe000UL /* Physical page number (PA[42:13])*/ | 15 | #define IOPTE_PAGE 0x00007fffffffe000UL |
16 | #define IOPTE_CACHE 0x0000000000000010UL /* Cached (in UPA E-cache) */ | 16 | #define IOPTE_CACHE 0x0000000000000010UL |
17 | #define IOPTE_WRITE 0x0000000000000002UL /* Writeable */ | 17 | #define IOPTE_WRITE 0x0000000000000002UL |
18 | 18 | ||
19 | #define IOMMU_NUM_CTXS 4096 | 19 | #define IOMMU_NUM_CTXS 4096 |
20 | 20 | ||
21 | struct iommu_arena { | ||
22 | unsigned long *map; | ||
23 | unsigned int hint; | ||
24 | unsigned int limit; | ||
25 | }; | ||
26 | |||
27 | struct iommu { | ||
28 | spinlock_t lock; | ||
29 | struct iommu_arena arena; | ||
30 | iopte_t *page_table; | ||
31 | u32 page_table_map_base; | ||
32 | unsigned long iommu_control; | ||
33 | unsigned long iommu_tsbbase; | ||
34 | unsigned long iommu_flush; | ||
35 | unsigned long iommu_ctxflush; | ||
36 | unsigned long write_complete_reg; | ||
37 | unsigned long dummy_page; | ||
38 | unsigned long dummy_page_pa; | ||
39 | unsigned long ctx_lowest_free; | ||
40 | DECLARE_BITMAP(ctx_bitmap, IOMMU_NUM_CTXS); | ||
41 | u32 dma_addr_mask; | ||
42 | }; | ||
43 | |||
44 | struct strbuf { | ||
45 | int strbuf_enabled; | ||
46 | unsigned long strbuf_control; | ||
47 | unsigned long strbuf_pflush; | ||
48 | unsigned long strbuf_fsync; | ||
49 | unsigned long strbuf_ctxflush; | ||
50 | unsigned long strbuf_ctxmatch_base; | ||
51 | unsigned long strbuf_flushflag_pa; | ||
52 | volatile unsigned long *strbuf_flushflag; | ||
53 | volatile unsigned long __flushflag_buf[(64+(64-1)) / sizeof(long)]; | ||
54 | }; | ||
55 | |||
21 | #endif /* !(_SPARC_IOMMU_H) */ | 56 | #endif /* !(_SPARC_IOMMU_H) */ |
diff --git a/include/asm-sparc64/isa.h b/include/asm-sparc64/isa.h index d9728b9031fc..ecd9290f78d4 100644 --- a/include/asm-sparc64/isa.h +++ b/include/asm-sparc64/isa.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #ifndef __SPARC64_ISA_H | 7 | #ifndef __SPARC64_ISA_H |
8 | #define __SPARC64_ISA_H | 8 | #define __SPARC64_ISA_H |
9 | 9 | ||
10 | #include <asm/pbm.h> | ||
11 | #include <asm/oplib.h> | 10 | #include <asm/oplib.h> |
12 | #include <asm/prom.h> | 11 | #include <asm/prom.h> |
13 | #include <asm/of_device.h> | 12 | #include <asm/of_device.h> |
@@ -29,7 +28,6 @@ struct sparc_isa_bridge { | |||
29 | struct of_device ofdev; | 28 | struct of_device ofdev; |
30 | struct sparc_isa_bridge *next; | 29 | struct sparc_isa_bridge *next; |
31 | struct sparc_isa_device *devices; | 30 | struct sparc_isa_device *devices; |
32 | struct pci_pbm_info *parent; | ||
33 | struct pci_dev *self; | 31 | struct pci_dev *self; |
34 | int index; | 32 | int index; |
35 | struct device_node *prom_node; | 33 | struct device_node *prom_node; |
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index 284dfd01a33d..6340a5253a34 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h | |||
@@ -103,7 +103,7 @@ static int ebus_ecpp_p(struct linux_ebus_device *edev) | |||
103 | if (!strcmp(edev->prom_node->name, "ecpp")) | 103 | if (!strcmp(edev->prom_node->name, "ecpp")) |
104 | return 1; | 104 | return 1; |
105 | if (!strcmp(edev->prom_node->name, "parallel")) { | 105 | if (!strcmp(edev->prom_node->name, "parallel")) { |
106 | char *compat; | 106 | const char *compat; |
107 | 107 | ||
108 | compat = of_get_property(edev->prom_node, | 108 | compat = of_get_property(edev->prom_node, |
109 | "compatible", NULL); | 109 | "compatible", NULL); |
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index 7a246d8a1828..c008cecca149 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: pbm.h,v 1.27 2001/08/12 13:18:23 davem Exp $ | 1 | /* pbm.h: UltraSparc PCI controller software state. |
2 | * pbm.h: UltraSparc PCI controller software state. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 1997, 1998, 1999, 2007 David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | 5 | ||
7 | #ifndef __SPARC64_PBM_H | 6 | #ifndef __SPARC64_PBM_H |
@@ -30,90 +29,7 @@ | |||
30 | * PCI bus. | 29 | * PCI bus. |
31 | */ | 30 | */ |
32 | 31 | ||
33 | struct pci_controller_info; | 32 | extern void pci_iommu_table_init(struct iommu *iommu, int tsbsize, u32 dma_offset, u32 dma_addr_mask); |
34 | |||
35 | /* This contains the software state necessary to drive a PCI | ||
36 | * controller's IOMMU. | ||
37 | */ | ||
38 | struct pci_iommu_arena { | ||
39 | unsigned long *map; | ||
40 | unsigned int hint; | ||
41 | unsigned int limit; | ||
42 | }; | ||
43 | |||
44 | struct pci_iommu { | ||
45 | /* This protects the controller's IOMMU and all | ||
46 | * streaming buffers underneath. | ||
47 | */ | ||
48 | spinlock_t lock; | ||
49 | |||
50 | struct pci_iommu_arena arena; | ||
51 | |||
52 | /* IOMMU page table, a linear array of ioptes. */ | ||
53 | iopte_t *page_table; /* The page table itself. */ | ||
54 | |||
55 | /* Base PCI memory space address where IOMMU mappings | ||
56 | * begin. | ||
57 | */ | ||
58 | u32 page_table_map_base; | ||
59 | |||
60 | /* IOMMU Controller Registers */ | ||
61 | unsigned long iommu_control; /* IOMMU control register */ | ||
62 | unsigned long iommu_tsbbase; /* IOMMU page table base register */ | ||
63 | unsigned long iommu_flush; /* IOMMU page flush register */ | ||
64 | unsigned long iommu_ctxflush; /* IOMMU context flush register */ | ||
65 | |||
66 | /* This is a register in the PCI controller, which if | ||
67 | * read will have no side-effects but will guarantee | ||
68 | * completion of all previous writes into IOMMU/STC. | ||
69 | */ | ||
70 | unsigned long write_complete_reg; | ||
71 | |||
72 | /* In order to deal with some buggy third-party PCI bridges that | ||
73 | * do wrong prefetching, we never mark valid mappings as invalid. | ||
74 | * Instead we point them at this dummy page. | ||
75 | */ | ||
76 | unsigned long dummy_page; | ||
77 | unsigned long dummy_page_pa; | ||
78 | |||
79 | /* CTX allocation. */ | ||
80 | unsigned long ctx_lowest_free; | ||
81 | unsigned long ctx_bitmap[IOMMU_NUM_CTXS / (sizeof(unsigned long) * 8)]; | ||
82 | |||
83 | /* Here a PCI controller driver describes the areas of | ||
84 | * PCI memory space where DMA to/from physical memory | ||
85 | * are addressed. Drivers interrogate the PCI layer | ||
86 | * if their device has addressing limitations. They | ||
87 | * do so via pci_dma_supported, and pass in a mask of | ||
88 | * DMA address bits their device can actually drive. | ||
89 | * | ||
90 | * The test for being usable is: | ||
91 | * (device_mask & dma_addr_mask) == dma_addr_mask | ||
92 | */ | ||
93 | u32 dma_addr_mask; | ||
94 | }; | ||
95 | |||
96 | extern void pci_iommu_table_init(struct pci_iommu *iommu, int tsbsize, u32 dma_offset, u32 dma_addr_mask); | ||
97 | |||
98 | /* This describes a PCI bus module's streaming buffer. */ | ||
99 | struct pci_strbuf { | ||
100 | int strbuf_enabled; /* Present and using it? */ | ||
101 | |||
102 | /* Streaming Buffer Control Registers */ | ||
103 | unsigned long strbuf_control; /* STC control register */ | ||
104 | unsigned long strbuf_pflush; /* STC page flush register */ | ||
105 | unsigned long strbuf_fsync; /* STC flush synchronization reg */ | ||
106 | unsigned long strbuf_ctxflush; /* STC context flush register */ | ||
107 | unsigned long strbuf_ctxmatch_base; /* STC context flush match reg */ | ||
108 | unsigned long strbuf_flushflag_pa; /* Physical address of flush flag */ | ||
109 | volatile unsigned long *strbuf_flushflag; /* The flush flag itself */ | ||
110 | |||
111 | /* And this is the actual flush flag area. | ||
112 | * We allocate extra because the chips require | ||
113 | * a 64-byte aligned area. | ||
114 | */ | ||
115 | volatile unsigned long __flushflag_buf[(64 + (64 - 1)) / sizeof(long)]; | ||
116 | }; | ||
117 | 33 | ||
118 | #define PCI_STC_FLUSHFLAG_INIT(STC) \ | 34 | #define PCI_STC_FLUSHFLAG_INIT(STC) \ |
119 | (*((STC)->strbuf_flushflag) = 0UL) | 35 | (*((STC)->strbuf_flushflag) = 0UL) |
@@ -126,6 +42,8 @@ struct pci_strbuf { | |||
126 | #define PROM_PCIRNG_MAX 64 | 42 | #define PROM_PCIRNG_MAX 64 |
127 | #define PROM_PCIIMAP_MAX 64 | 43 | #define PROM_PCIIMAP_MAX 64 |
128 | 44 | ||
45 | struct pci_controller_info; | ||
46 | |||
129 | struct pci_pbm_info { | 47 | struct pci_pbm_info { |
130 | /* PCI controller we sit under. */ | 48 | /* PCI controller we sit under. */ |
131 | struct pci_controller_info *parent; | 49 | struct pci_controller_info *parent; |
@@ -160,11 +78,6 @@ struct pci_pbm_info { | |||
160 | 78 | ||
161 | /* OBP specific information. */ | 79 | /* OBP specific information. */ |
162 | struct device_node *prom_node; | 80 | struct device_node *prom_node; |
163 | struct linux_prom_pci_ranges *pbm_ranges; | ||
164 | int num_pbm_ranges; | ||
165 | struct linux_prom_pci_intmap *pbm_intmap; | ||
166 | int num_pbm_intmap; | ||
167 | struct linux_prom_pci_intmask *pbm_intmask; | ||
168 | u64 ino_bitmap; | 81 | u64 ino_bitmap; |
169 | 82 | ||
170 | /* PBM I/O and Memory space resources. */ | 83 | /* PBM I/O and Memory space resources. */ |
@@ -197,13 +110,10 @@ struct pci_pbm_info { | |||
197 | #endif /* !(CONFIG_PCI_MSI) */ | 110 | #endif /* !(CONFIG_PCI_MSI) */ |
198 | 111 | ||
199 | /* This PBM's streaming buffer. */ | 112 | /* This PBM's streaming buffer. */ |
200 | struct pci_strbuf stc; | 113 | struct strbuf stc; |
201 | 114 | ||
202 | /* IOMMU state, potentially shared by both PBM segments. */ | 115 | /* IOMMU state, potentially shared by both PBM segments. */ |
203 | struct pci_iommu *iommu; | 116 | struct iommu *iommu; |
204 | |||
205 | /* PCI slot mapping. */ | ||
206 | unsigned int pci_first_slot; | ||
207 | 117 | ||
208 | /* Now things for the actual PCI bus probes. */ | 118 | /* Now things for the actual PCI bus probes. */ |
209 | unsigned int pci_first_busno; | 119 | unsigned int pci_first_busno; |
@@ -220,17 +130,12 @@ struct pci_controller_info { | |||
220 | */ | 130 | */ |
221 | int index; | 131 | int index; |
222 | 132 | ||
223 | /* Do the PBMs both exist in the same PCI domain? */ | ||
224 | int pbms_same_domain; | ||
225 | |||
226 | /* The PCI bus modules controlled by us. */ | 133 | /* The PCI bus modules controlled by us. */ |
227 | struct pci_pbm_info pbm_A; | 134 | struct pci_pbm_info pbm_A; |
228 | struct pci_pbm_info pbm_B; | 135 | struct pci_pbm_info pbm_B; |
229 | 136 | ||
230 | /* Operations which are controller specific. */ | 137 | /* Operations which are controller specific. */ |
231 | void (*scan_bus)(struct pci_controller_info *); | 138 | void (*scan_bus)(struct pci_controller_info *); |
232 | void (*base_address_update)(struct pci_dev *, int); | ||
233 | void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); | ||
234 | 139 | ||
235 | #ifdef CONFIG_PCI_MSI | 140 | #ifdef CONFIG_PCI_MSI |
236 | int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev, | 141 | int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev, |
@@ -244,27 +149,4 @@ struct pci_controller_info { | |||
244 | unsigned int pci_last_busno; | 149 | unsigned int pci_last_busno; |
245 | }; | 150 | }; |
246 | 151 | ||
247 | /* PCI devices which are not bridges have this placed in their pci_dev | ||
248 | * sysdata member. This makes OBP aware PCI device drivers easier to | ||
249 | * code. | ||
250 | */ | ||
251 | struct pcidev_cookie { | ||
252 | struct pci_pbm_info *pbm; | ||
253 | struct device_node *prom_node; | ||
254 | struct of_device *op; | ||
255 | struct linux_prom_pci_registers prom_regs[PROMREG_MAX]; | ||
256 | int num_prom_regs; | ||
257 | struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; | ||
258 | int num_prom_assignments; | ||
259 | #ifdef CONFIG_PCI_MSI | ||
260 | unsigned int msi_num; | ||
261 | #endif | ||
262 | }; | ||
263 | |||
264 | /* Currently these are the same across all PCI controllers | ||
265 | * we support. Someday they may not be... | ||
266 | */ | ||
267 | #define PCI_IRQ_IGN 0x000007c0 /* Interrupt Group Number */ | ||
268 | #define PCI_IRQ_INO 0x0000003f /* Interrupt Number */ | ||
269 | |||
270 | #endif /* !(__SPARC64_PBM_H) */ | 152 | #endif /* !(__SPARC64_PBM_H) */ |
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h index b14a725b430d..47cea16e1bad 100644 --- a/include/asm-sparc64/pci.h +++ b/include/asm-sparc64/pci.h | |||
@@ -54,7 +54,7 @@ struct pci_iommu_ops { | |||
54 | void (*dma_sync_sg_for_cpu)(struct pci_dev *, struct scatterlist *, int, int); | 54 | void (*dma_sync_sg_for_cpu)(struct pci_dev *, struct scatterlist *, int, int); |
55 | }; | 55 | }; |
56 | 56 | ||
57 | extern struct pci_iommu_ops *pci_iommu_ops; | 57 | extern const struct pci_iommu_ops *pci_iommu_ops; |
58 | 58 | ||
59 | /* Allocate and map kernel buffer using consistent mode DMA for a device. | 59 | /* Allocate and map kernel buffer using consistent mode DMA for a device. |
60 | * hwdev should be valid struct pci_dev pointer for PCI devices. | 60 | * hwdev should be valid struct pci_dev pointer for PCI devices. |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index b12be7a869f6..46705ef47d27 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -737,20 +737,6 @@ extern unsigned long pte_file(pte_t); | |||
737 | extern pte_t pgoff_to_pte(unsigned long); | 737 | extern pte_t pgoff_to_pte(unsigned long); |
738 | #define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL) | 738 | #define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL) |
739 | 739 | ||
740 | extern unsigned long prom_virt_to_phys(unsigned long, int *); | ||
741 | |||
742 | extern unsigned long sun4u_get_pte(unsigned long); | ||
743 | |||
744 | static inline unsigned long __get_phys(unsigned long addr) | ||
745 | { | ||
746 | return sun4u_get_pte(addr); | ||
747 | } | ||
748 | |||
749 | static inline int __get_iospace(unsigned long addr) | ||
750 | { | ||
751 | return ((sun4u_get_pte(addr) & 0xf0000000) >> 28); | ||
752 | } | ||
753 | |||
754 | extern unsigned long *sparc64_valid_addr_bitmap; | 740 | extern unsigned long *sparc64_valid_addr_bitmap; |
755 | 741 | ||
756 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ | 742 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ |
@@ -791,6 +777,8 @@ extern void pgtable_cache_init(void); | |||
791 | extern void sun4v_register_fault_status(void); | 777 | extern void sun4v_register_fault_status(void); |
792 | extern void sun4v_ktsb_register(void); | 778 | extern void sun4v_ktsb_register(void); |
793 | 779 | ||
780 | extern unsigned long cmdline_memory_size; | ||
781 | |||
794 | #endif /* !(__ASSEMBLY__) */ | 782 | #endif /* !(__ASSEMBLY__) */ |
795 | 783 | ||
796 | #endif /* !(_SPARC64_PGTABLE_H) */ | 784 | #endif /* !(_SPARC64_PGTABLE_H) */ |
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h index 0eca2d98627f..ddad5f99ac7f 100644 --- a/include/asm-sparc64/prom.h +++ b/include/asm-sparc64/prom.h | |||
@@ -36,8 +36,8 @@ struct property { | |||
36 | 36 | ||
37 | struct of_irq_controller; | 37 | struct of_irq_controller; |
38 | struct device_node { | 38 | struct device_node { |
39 | char *name; | 39 | const char *name; |
40 | char *type; | 40 | const char *type; |
41 | phandle node; | 41 | phandle node; |
42 | char *path_component_name; | 42 | char *path_component_name; |
43 | char *full_name; | 43 | char *full_name; |
@@ -93,11 +93,13 @@ extern struct device_node *of_find_node_by_phandle(phandle handle); | |||
93 | extern struct device_node *of_get_parent(const struct device_node *node); | 93 | extern struct device_node *of_get_parent(const struct device_node *node); |
94 | extern struct device_node *of_get_next_child(const struct device_node *node, | 94 | extern struct device_node *of_get_next_child(const struct device_node *node, |
95 | struct device_node *prev); | 95 | struct device_node *prev); |
96 | extern struct property *of_find_property(struct device_node *np, | 96 | extern struct property *of_find_property(const struct device_node *np, |
97 | const char *name, | 97 | const char *name, |
98 | int *lenp); | 98 | int *lenp); |
99 | extern int of_device_is_compatible(struct device_node *device, const char *); | 99 | extern int of_device_is_compatible(const struct device_node *device, |
100 | extern void *of_get_property(struct device_node *node, const char *name, | 100 | const char *); |
101 | extern const void *of_get_property(const struct device_node *node, | ||
102 | const char *name, | ||
101 | int *lenp); | 103 | int *lenp); |
102 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) | 104 | #define get_property(node,name,lenp) of_get_property(node,name,lenp) |
103 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | 105 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); |
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h index 388249b751c3..cca54804b722 100644 --- a/include/asm-sparc64/smp.h +++ b/include/asm-sparc64/smp.h | |||
@@ -42,15 +42,15 @@ extern int hard_smp_processor_id(void); | |||
42 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 42 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
43 | 43 | ||
44 | extern void smp_setup_cpu_possible_map(void); | 44 | extern void smp_setup_cpu_possible_map(void); |
45 | extern unsigned char boot_cpu_id; | ||
45 | 46 | ||
46 | #endif /* !(__ASSEMBLY__) */ | 47 | #endif /* !(__ASSEMBLY__) */ |
47 | 48 | ||
48 | #else | 49 | #else |
49 | 50 | ||
50 | #define smp_setup_cpu_possible_map() do { } while (0) | 51 | #define smp_setup_cpu_possible_map() do { } while (0) |
52 | #define boot_cpu_id (0) | ||
51 | 53 | ||
52 | #endif /* !(CONFIG_SMP) */ | 54 | #endif /* !(CONFIG_SMP) */ |
53 | 55 | ||
54 | #define NO_PROC_ID 0xFF | ||
55 | |||
56 | #endif /* !(_SPARC64_SMP_H) */ | 56 | #endif /* !(_SPARC64_SMP_H) */ |
diff --git a/include/asm-sparc64/sparsemem.h b/include/asm-sparc64/sparsemem.h index ed5c9d8541e2..77bcd2bfa53c 100644 --- a/include/asm-sparc64/sparsemem.h +++ b/include/asm-sparc64/sparsemem.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #define SECTION_SIZE_BITS 26 | 6 | #define SECTION_SIZE_BITS 31 |
7 | #define MAX_PHYSADDR_BITS 42 | 7 | #define MAX_PHYSADDR_BITS 42 |
8 | #define MAX_PHYSMEM_BITS 42 | 8 | #define MAX_PHYSMEM_BITS 42 |
9 | 9 | ||
diff --git a/include/asm-sparc64/timer.h b/include/asm-sparc64/timer.h index d435594df786..ccbd69448866 100644 --- a/include/asm-sparc64/timer.h +++ b/include/asm-sparc64/timer.h | |||
@@ -11,22 +11,19 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | struct sparc64_tick_ops { | 13 | struct sparc64_tick_ops { |
14 | void (*init_tick)(unsigned long); | ||
15 | unsigned long (*get_tick)(void); | 14 | unsigned long (*get_tick)(void); |
16 | unsigned long (*get_compare)(void); | 15 | int (*add_compare)(unsigned long); |
17 | unsigned long (*add_tick)(unsigned long, unsigned long); | ||
18 | unsigned long (*add_compare)(unsigned long); | ||
19 | unsigned long softint_mask; | 16 | unsigned long softint_mask; |
17 | void (*disable_irq)(void); | ||
18 | |||
19 | void (*init_tick)(void); | ||
20 | unsigned long (*add_tick)(unsigned long); | ||
21 | |||
22 | char *name; | ||
20 | }; | 23 | }; |
21 | 24 | ||
22 | extern struct sparc64_tick_ops *tick_ops; | 25 | extern struct sparc64_tick_ops *tick_ops; |
23 | 26 | ||
24 | #ifdef CONFIG_SMP | ||
25 | extern unsigned long timer_tick_offset; | ||
26 | struct pt_regs; | ||
27 | extern void timer_tick_interrupt(struct pt_regs *); | ||
28 | #endif | ||
29 | |||
30 | extern unsigned long sparc64_get_clock_tick(unsigned int cpu); | 27 | extern unsigned long sparc64_get_clock_tick(unsigned int cpu); |
31 | 28 | ||
32 | #endif /* _SPARC64_TIMER_H */ | 29 | #endif /* _SPARC64_TIMER_H */ |
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h index c2a16e188499..bbb9c8f13d61 100644 --- a/include/asm-sparc64/ttable.h +++ b/include/asm-sparc64/ttable.h | |||
@@ -157,23 +157,6 @@ | |||
157 | ba,a,pt %xcc, rtrap_irq; \ | 157 | ba,a,pt %xcc, rtrap_irq; \ |
158 | .previous; | 158 | .previous; |
159 | 159 | ||
160 | #define TICK_SMP_IRQ \ | ||
161 | rdpr %pil, %g2; \ | ||
162 | wrpr %g0, 15, %pil; \ | ||
163 | sethi %hi(1f-4), %g7; \ | ||
164 | ba,pt %xcc, etrap_irq; \ | ||
165 | or %g7, %lo(1f-4), %g7; \ | ||
166 | nop; \ | ||
167 | nop; \ | ||
168 | nop; \ | ||
169 | .subsection 2; \ | ||
170 | 1: call trace_hardirqs_off; \ | ||
171 | nop; \ | ||
172 | call smp_percpu_timer_interrupt; \ | ||
173 | add %sp, PTREGS_OFF, %o0; \ | ||
174 | ba,a,pt %xcc, rtrap_irq; \ | ||
175 | .previous; | ||
176 | |||
177 | #else | 160 | #else |
178 | 161 | ||
179 | #define TRAP_IRQ(routine, level) \ | 162 | #define TRAP_IRQ(routine, level) \ |
@@ -186,16 +169,6 @@ | |||
186 | add %sp, PTREGS_OFF, %o1; \ | 169 | add %sp, PTREGS_OFF, %o1; \ |
187 | ba,a,pt %xcc, rtrap_irq; | 170 | ba,a,pt %xcc, rtrap_irq; |
188 | 171 | ||
189 | #define TICK_SMP_IRQ \ | ||
190 | rdpr %pil, %g2; \ | ||
191 | wrpr %g0, 15, %pil; \ | ||
192 | sethi %hi(109f), %g7; \ | ||
193 | ba,pt %xcc, etrap_irq; \ | ||
194 | 109: or %g7, %lo(109b), %g7; \ | ||
195 | call smp_percpu_timer_interrupt; \ | ||
196 | add %sp, PTREGS_OFF, %o0; \ | ||
197 | ba,a,pt %xcc, rtrap_irq; | ||
198 | |||
199 | #endif | 172 | #endif |
200 | 173 | ||
201 | #define TRAP_IVEC TRAP_NOSAVE(do_ivec) | 174 | #define TRAP_IVEC TRAP_NOSAVE(do_ivec) |
diff --git a/include/linux/string.h b/include/linux/string.h index 4f69ef9e6eb5..7f2eb6a477f9 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -47,6 +47,12 @@ extern int strncmp(const char *,const char *,__kernel_size_t); | |||
47 | #ifndef __HAVE_ARCH_STRNICMP | 47 | #ifndef __HAVE_ARCH_STRNICMP |
48 | extern int strnicmp(const char *, const char *, __kernel_size_t); | 48 | extern int strnicmp(const char *, const char *, __kernel_size_t); |
49 | #endif | 49 | #endif |
50 | #ifndef __HAVE_ARCH_STRCASECMP | ||
51 | extern int strcasecmp(const char *s1, const char *s2); | ||
52 | #endif | ||
53 | #ifndef __HAVE_ARCH_STRNCASECMP | ||
54 | extern int strncasecmp(const char *s1, const char *s2, size_t n); | ||
55 | #endif | ||
50 | #ifndef __HAVE_ARCH_STRCHR | 56 | #ifndef __HAVE_ARCH_STRCHR |
51 | extern char * strchr(const char *,int); | 57 | extern char * strchr(const char *,int); |
52 | #endif | 58 | #endif |