Commit 5b88bb8f authored by Pete Zaitcev's avatar Pete Zaitcev Committed by David S. Miller

[SPARC]: Cleanups and bug fixes.

- vac property enumeration pollutes namespace
- LEON sparc needs extra nop in task switch
- Comment out debugging printk.
parent 6ec2159c
......@@ -514,7 +514,7 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t len, dma_addr_t *pba)
mmu_inval_dma_area(va, len_total);
#if 1
#if 0
/* P3 */ printk("pci_alloc_consistent: kva %lx uncva %lx phys %lx size %x\n",
(long)va, (long)res->start, (long)virt_to_phys(va), len_total);
#endif
......
......@@ -292,7 +292,7 @@ void __init sun4c_probe_vac(void)
switch (idprom->id_machtype) {
case (SM_SUN4|SM_4_110):
sun4c_vacinfo.type = NONE;
sun4c_vacinfo.type = VAC_NONE;
sun4c_vacinfo.num_bytes = 0;
sun4c_vacinfo.linesize = 0;
sun4c_vacinfo.do_hwflushes = 0;
......@@ -301,21 +301,21 @@ void __init sun4c_probe_vac(void)
break;
case (SM_SUN4|SM_4_260):
sun4c_vacinfo.type = WRITE_BACK;
sun4c_vacinfo.type = VAC_WRITE_BACK;
sun4c_vacinfo.num_bytes = 128 * 1024;
sun4c_vacinfo.linesize = 16;
sun4c_vacinfo.do_hwflushes = 0;
break;
case (SM_SUN4|SM_4_330):
sun4c_vacinfo.type = WRITE_THROUGH;
sun4c_vacinfo.type = VAC_WRITE_THROUGH;
sun4c_vacinfo.num_bytes = 128 * 1024;
sun4c_vacinfo.linesize = 16;
sun4c_vacinfo.do_hwflushes = 0;
break;
case (SM_SUN4|SM_4_470):
sun4c_vacinfo.type = WRITE_BACK;
sun4c_vacinfo.type = VAC_WRITE_BACK;
sun4c_vacinfo.num_bytes = 128 * 1024;
sun4c_vacinfo.linesize = 32;
sun4c_vacinfo.do_hwflushes = 0;
......@@ -326,7 +326,7 @@ void __init sun4c_probe_vac(void)
prom_halt();
};
} else {
sun4c_vacinfo.type = WRITE_THROUGH;
sun4c_vacinfo.type = VAC_WRITE_THROUGH;
if ((idprom->id_machtype == (SM_SUN4C | SM_4C_SS1)) ||
(idprom->id_machtype == (SM_SUN4C | SM_4C_SS1PLUS))) {
......
......@@ -135,7 +135,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
* clobber every non-fixed-usage register besides l2/l3/o4/o5. -DaveM
*
* Hey Dave, that do not touch sign is too much of an incentive
* - Anton
* - Anton & Pete
*/
#define switch_to(prev, next, last) do { \
__label__ here; \
......@@ -160,6 +160,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
"wr %%g4, 0x20, %%psr\n\t" \
"nop\n\t" \
"nop\n\t" \
"nop\n\t" /* LEON needs this: load to %sp depends on CWP. */ \
"ldd [%%g6 + %4], %%sp\n\t" \
"wr %%g5, 0x0, %%wim\n\t" \
"ldd [%%sp + 0x00], %%l0\n\t" \
......
......@@ -98,8 +98,8 @@ struct sun4c_vac_props {
unsigned int num_bytes; /* Size of the cache */
unsigned int num_lines; /* Number of cache lines */
unsigned int do_hwflushes; /* Hardware flushing available? */
enum { NONE, WRITE_THROUGH,
WRITE_BACK } type; /* What type of VAC? */
enum { VAC_NONE, VAC_WRITE_THROUGH,
VAC_WRITE_BACK } type; /* What type of VAC? */
unsigned int linesize; /* Size of each line in bytes */
unsigned int log2lsize; /* log2(linesize) */
unsigned int on; /* VAC is enabled */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment