aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-09-27 16:33:25 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-27 16:33:25 -0400
commit95001ee9256df846e374f116c92ca8e0beec1527 (patch)
treeef682e01be51423592d19c5c9425363ef3881ca7 /include
parent63906e41fe70fe8a376c5887429448272a0ee7d4 (diff)
parent0dc461069879b45a2d5333bd16990f8080a318fd (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Diffstat (limited to 'include')
-rw-r--r--include/asm-sparc64/cacheflush.h5
-rw-r--r--include/asm-sparc64/cpudata.h10
-rw-r--r--include/asm-sparc64/oplib.h52
-rw-r--r--include/asm-sparc64/pgtable.h7
4 files changed, 52 insertions, 22 deletions
diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h
index ededd2659eab..b3f61659ba81 100644
--- a/include/asm-sparc64/cacheflush.h
+++ b/include/asm-sparc64/cacheflush.h
@@ -66,6 +66,11 @@ extern void flush_ptrace_access(struct vm_area_struct *, struct page *,
66#define flush_cache_vmap(start, end) do { } while (0) 66#define flush_cache_vmap(start, end) do { } while (0)
67#define flush_cache_vunmap(start, end) do { } while (0) 67#define flush_cache_vunmap(start, end) do { } while (0)
68 68
69#ifdef CONFIG_DEBUG_PAGEALLOC
70/* internal debugging function */
71void kernel_map_pages(struct page *page, int numpages, int enable);
72#endif
73
69#endif /* !__ASSEMBLY__ */ 74#endif /* !__ASSEMBLY__ */
70 75
71#endif /* _SPARC64_CACHEFLUSH_H */ 76#endif /* _SPARC64_CACHEFLUSH_H */
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h
index 9a3a81f1cc58..74de79dca915 100644
--- a/include/asm-sparc64/cpudata.h
+++ b/include/asm-sparc64/cpudata.h
@@ -22,6 +22,16 @@ typedef struct {
22 unsigned int __pad1; 22 unsigned int __pad1;
23 unsigned long *pte_cache[2]; 23 unsigned long *pte_cache[2];
24 unsigned long *pgd_cache; 24 unsigned long *pgd_cache;
25
26 /* Dcache line 3, rarely used */
27 unsigned int dcache_size;
28 unsigned int dcache_line_size;
29 unsigned int icache_size;
30 unsigned int icache_line_size;
31 unsigned int ecache_size;
32 unsigned int ecache_line_size;
33 unsigned int __pad2;
34 unsigned int __pad3;
25} cpuinfo_sparc; 35} cpuinfo_sparc;
26 36
27DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data); 37DECLARE_PER_CPU(cpuinfo_sparc, __cpu_data);
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h
index a432d9e7daaa..c628189b6c89 100644
--- a/include/asm-sparc64/oplib.h
+++ b/include/asm-sparc64/oplib.h
@@ -38,6 +38,20 @@ extern int prom_stdin, prom_stdout;
38 */ 38 */
39extern int prom_chosen_node; 39extern int prom_chosen_node;
40 40
41/* Helper values and strings in arch/sparc64/kernel/head.S */
42extern const char prom_finddev_name[];
43extern const char prom_chosen_path[];
44extern const char prom_getprop_name[];
45extern const char prom_mmu_name[];
46extern const char prom_callmethod_name[];
47extern const char prom_translate_name[];
48extern const char prom_map_name[];
49extern const char prom_unmap_name[];
50extern int prom_mmu_ihandle_cache;
51extern unsigned int prom_boot_mapped_pc;
52extern unsigned int prom_boot_mapping_mode;
53extern unsigned long prom_boot_mapping_phys_high, prom_boot_mapping_phys_low;
54
41struct linux_mlist_p1275 { 55struct linux_mlist_p1275 {
42 struct linux_mlist_p1275 *theres_more; 56 struct linux_mlist_p1275 *theres_more;
43 unsigned long start_adr; 57 unsigned long start_adr;
@@ -68,7 +82,7 @@ extern char *prom_getbootargs(void);
68 * of the string is different on V0 vs. V2->higher proms. The caller must 82 * of the string is different on V0 vs. V2->higher proms. The caller must
69 * know what he/she is doing! Returns the device descriptor, an int. 83 * know what he/she is doing! Returns the device descriptor, an int.
70 */ 84 */
71extern int prom_devopen(char *device_string); 85extern int prom_devopen(const char *device_string);
72 86
73/* Close a previously opened device described by the passed integer 87/* Close a previously opened device described by the passed integer
74 * descriptor. 88 * descriptor.
@@ -98,10 +112,10 @@ extern struct linux_mem_p1275 *prom_meminfo(void);
98/* Miscellaneous routines, don't really fit in any category per se. */ 112/* Miscellaneous routines, don't really fit in any category per se. */
99 113
100/* Reboot the machine with the command line passed. */ 114/* Reboot the machine with the command line passed. */
101extern void prom_reboot(char *boot_command); 115extern void prom_reboot(const char *boot_command);
102 116
103/* Evaluate the forth string passed. */ 117/* Evaluate the forth string passed. */
104extern void prom_feval(char *forth_string); 118extern void prom_feval(const char *forth_string);
105 119
106/* Enter the prom, with possibility of continuation with the 'go' 120/* Enter the prom, with possibility of continuation with the 'go'
107 * command in newer proms. 121 * command in newer proms.
@@ -154,7 +168,7 @@ extern char prom_getchar(void);
154extern void prom_putchar(char character); 168extern void prom_putchar(char character);
155 169
156/* Prom's internal routines, don't use in kernel/boot code. */ 170/* Prom's internal routines, don't use in kernel/boot code. */
157extern void prom_printf(char *fmt, ...); 171extern void prom_printf(const char *fmt, ...);
158extern void prom_write(const char *buf, unsigned int len); 172extern void prom_write(const char *buf, unsigned int len);
159 173
160/* Query for input device type */ 174/* Query for input device type */
@@ -215,7 +229,7 @@ extern int prom_getunumber(int syndrome_code,
215 char *buf, int buflen); 229 char *buf, int buflen);
216 230
217/* Retain physical memory to the caller across soft resets. */ 231/* Retain physical memory to the caller across soft resets. */
218extern unsigned long prom_retain(char *name, 232extern unsigned long prom_retain(const char *name,
219 unsigned long pa_low, unsigned long pa_high, 233 unsigned long pa_low, unsigned long pa_high,
220 long size, long align); 234 long size, long align);
221 235
@@ -269,28 +283,28 @@ extern int prom_getsibling(int node);
269/* Get the length, at the passed node, of the given property type. 283/* Get the length, at the passed node, of the given property type.
270 * Returns -1 on error (ie. no such property at this node). 284 * Returns -1 on error (ie. no such property at this node).
271 */ 285 */
272extern int prom_getproplen(int thisnode, char *property); 286extern int prom_getproplen(int thisnode, const char *property);
273 287
274/* Fetch the requested property using the given buffer. Returns 288/* Fetch the requested property using the given buffer. Returns
275 * the number of bytes the prom put into your buffer or -1 on error. 289 * the number of bytes the prom put into your buffer or -1 on error.
276 */ 290 */
277extern int prom_getproperty(int thisnode, char *property, 291extern int prom_getproperty(int thisnode, const char *property,
278 char *prop_buffer, int propbuf_size); 292 char *prop_buffer, int propbuf_size);
279 293
280/* Acquire an integer property. */ 294/* Acquire an integer property. */
281extern int prom_getint(int node, char *property); 295extern int prom_getint(int node, const char *property);
282 296
283/* Acquire an integer property, with a default value. */ 297/* Acquire an integer property, with a default value. */
284extern int prom_getintdefault(int node, char *property, int defval); 298extern int prom_getintdefault(int node, const char *property, int defval);
285 299
286/* Acquire a boolean property, 0=FALSE 1=TRUE. */ 300/* Acquire a boolean property, 0=FALSE 1=TRUE. */
287extern int prom_getbool(int node, char *prop); 301extern int prom_getbool(int node, const char *prop);
288 302
289/* Acquire a string property, null string on error. */ 303/* Acquire a string property, null string on error. */
290extern void prom_getstring(int node, char *prop, char *buf, int bufsize); 304extern void prom_getstring(int node, const char *prop, char *buf, int bufsize);
291 305
292/* Does the passed node have the given "name"? YES=1 NO=0 */ 306/* Does the passed node have the given "name"? YES=1 NO=0 */
293extern int prom_nodematch(int thisnode, char *name); 307extern int prom_nodematch(int thisnode, const char *name);
294 308
295/* Puts in buffer a prom name in the form name@x,y or name (x for which_io 309/* Puts in buffer a prom name in the form name@x,y or name (x for which_io
296 * and y for first regs phys address 310 * and y for first regs phys address
@@ -300,7 +314,7 @@ extern int prom_getname(int node, char *buf, int buflen);
300/* Search all siblings starting at the passed node for "name" matching 314/* Search all siblings starting at the passed node for "name" matching
301 * the given string. Returns the node on success, zero on failure. 315 * the given string. Returns the node on success, zero on failure.
302 */ 316 */
303extern int prom_searchsiblings(int node_start, char *name); 317extern int prom_searchsiblings(int node_start, const char *name);
304 318
305/* Return the first property type, as a string, for the given node. 319/* Return the first property type, as a string, for the given node.
306 * Returns a null string on error. Buffer should be at least 32B long. 320 * Returns a null string on error. Buffer should be at least 32B long.
@@ -310,21 +324,21 @@ extern char *prom_firstprop(int node, char *buffer);
310/* Returns the next property after the passed property for the given 324/* Returns the next property after the passed property for the given
311 * node. Returns null string on failure. Buffer should be at least 32B long. 325 * node. Returns null string on failure. Buffer should be at least 32B long.
312 */ 326 */
313extern char *prom_nextprop(int node, char *prev_property, char *buffer); 327extern char *prom_nextprop(int node, const char *prev_property, char *buffer);
314 328
315/* Returns 1 if the specified node has given property. */ 329/* Returns 1 if the specified node has given property. */
316extern int prom_node_has_property(int node, char *property); 330extern int prom_node_has_property(int node, const char *property);
317 331
318/* Returns phandle of the path specified */ 332/* Returns phandle of the path specified */
319extern int prom_finddevice(char *name); 333extern int prom_finddevice(const char *name);
320 334
321/* Set the indicated property at the given node with the passed value. 335/* Set the indicated property at the given node with the passed value.
322 * Returns the number of bytes of your value that the prom took. 336 * Returns the number of bytes of your value that the prom took.
323 */ 337 */
324extern int prom_setprop(int node, char *prop_name, char *prop_value, 338extern int prom_setprop(int node, const char *prop_name, char *prop_value,
325 int value_size); 339 int value_size);
326 340
327extern int prom_pathtoinode(char *path); 341extern int prom_pathtoinode(const char *path);
328extern int prom_inst2pkg(int); 342extern int prom_inst2pkg(int);
329 343
330/* CPU probing helpers. */ 344/* CPU probing helpers. */
@@ -334,7 +348,7 @@ int cpu_find_by_mid(int mid, int *prom_node);
334/* Client interface level routines. */ 348/* Client interface level routines. */
335extern void prom_set_trap_table(unsigned long tba); 349extern void prom_set_trap_table(unsigned long tba);
336 350
337extern long p1275_cmd (char *, long, ...); 351extern long p1275_cmd(const char *, long, ...);
338 352
339 353
340#if 0 354#if 0
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index a297f6144f0f..43cbb089cde2 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -60,13 +60,13 @@
60 * table can map 60 * table can map
61 */ 61 */
62#define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3)) 62#define PMD_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3))
63#define PMD_SIZE (1UL << PMD_SHIFT) 63#define PMD_SIZE (_AC(1,UL) << PMD_SHIFT)
64#define PMD_MASK (~(PMD_SIZE-1)) 64#define PMD_MASK (~(PMD_SIZE-1))
65#define PMD_BITS (PAGE_SHIFT - 2) 65#define PMD_BITS (PAGE_SHIFT - 2)
66 66
67/* PGDIR_SHIFT determines what a third-level page table entry can map */ 67/* PGDIR_SHIFT determines what a third-level page table entry can map */
68#define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3) + PMD_BITS) 68#define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT-3) + PMD_BITS)
69#define PGDIR_SIZE (1UL << PGDIR_SHIFT) 69#define PGDIR_SIZE (_AC(1,UL) << PGDIR_SHIFT)
70#define PGDIR_MASK (~(PGDIR_SIZE-1)) 70#define PGDIR_MASK (~(PGDIR_SIZE-1))
71#define PGDIR_BITS (PAGE_SHIFT - 2) 71#define PGDIR_BITS (PAGE_SHIFT - 2)
72 72
@@ -336,7 +336,8 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *p
336#define pte_clear(mm,addr,ptep) \ 336#define pte_clear(mm,addr,ptep) \
337 set_pte_at((mm), (addr), (ptep), __pte(0UL)) 337 set_pte_at((mm), (addr), (ptep), __pte(0UL))
338 338
339extern pgd_t swapper_pg_dir[1]; 339extern pgd_t swapper_pg_dir[2048];
340extern pmd_t swapper_low_pmd_dir[2048];
340 341
341/* These do nothing with the way I have things setup. */ 342/* These do nothing with the way I have things setup. */
342#define mmu_lockarea(vaddr, len) (vaddr) 343#define mmu_lockarea(vaddr, len) (vaddr)