patch-2.1.97 linux/arch/ppc/kernel/ppc_htab.c
Next file: linux/arch/ppc/kernel/ppc_ksyms.c
Previous file: linux/arch/ppc/kernel/ppc-stub.c
Back to the patch index
Back to the overall index
- Lines: 65
- Date:
Tue Apr 14 17:33:58 1998
- Orig file:
v2.1.96/linux/arch/ppc/kernel/ppc_htab.c
- Orig date:
Mon Jan 12 15:18:13 1998
diff -u --recursive --new-file v2.1.96/linux/arch/ppc/kernel/ppc_htab.c linux/arch/ppc/kernel/ppc_htab.c
@@ -1,5 +1,5 @@
/*
- * $Id: ppc_htab.c,v 1.16 1997/11/17 18:25:04 cort Exp $
+ * $Id: ppc_htab.c,v 1.17 1998/03/14 07:52:49 cort Exp $
*
* PowerPC hash table management proc entry. Will show information
* about the current hash table and will allow changes to it.
@@ -88,6 +88,7 @@
#define PMC1 953
#define PMC2 954
+#ifndef CONFIG_8xx
char *pmc1_lookup(unsigned long mmcr0)
{
switch ( mmcr0 & (0x7f<<7) )
@@ -123,7 +124,7 @@
return "unknown";
}
}
-
+#endif /* CONFIG_8xx */
/*
* print some useful info about the hash table. This function
@@ -133,6 +134,7 @@
static ssize_t ppc_htab_read(struct file * file, char * buf,
size_t count, loff_t *ppos)
{
+#ifndef CONFIG_8xx
unsigned long mmcr0 = 0, pmc1 = 0, pmc2 = 0;
int n = 0, valid;
unsigned int kptes = 0, overflow = 0, uptes = 0, zombie_ptes = 0;
@@ -249,6 +251,9 @@
copy_to_user(buf, buffer + *ppos, n);
*ppos += n;
return n;
+#else /* CONFIG_8xx */
+ return 0;
+#endif /* CONFIG_8xx */
}
/*
@@ -257,6 +262,7 @@
static ssize_t ppc_htab_write(struct file * file, const char * buffer,
size_t count, loff_t *ppos)
{
+#ifndef CONFIG_8xx
unsigned long tmp;
if ( current->uid != 0 )
return -EACCES;
@@ -493,6 +499,9 @@
reset_SDR1();
#endif
return count;
+#else /* CONFIG_8xx */
+ return 0;
+#endif /* CONFIG_8xx */
}
@@ -512,4 +521,3 @@
return(-EINVAL);
}
}
-
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov