Re: uml-patch-2.5.42-1

Oleg Drokin
2002-10-15T06:36:28Z

Hello!

On Mon, Oct 14, 2002 at 07:58:28PM -0500, Jeff Dike wrote:
> UML has been updated to 2.5.42 and UML 2.4.19-12. In non-numeric terms,

For some reason I now need this patch to make bk-current to compile
(with 2.5.42-1 patch from you applied, of course).
I do not claim this is correct fix, but at least it works for me ;)

===== drivers/char/random.c 1.24 vs edited =====
--- 1.24/drivers/char/random.c Mon Oct 7 18:38:26 2002
+++ edited/drivers/char/random.c Tue Oct 15 10:20:50 2002
@@ -738,7 +738,7 @@
__s32 delta, delta2, delta3;
int entropy = 0;

-#if defined (__i386__) || defined (__x86_64__)
+#if (defined (__i386__) || defined (__x86_64__)) && !defined (__arch_um__)
if (cpu_has_tsc) {
__u32 high;
rdtsc(time, high);
===== drivers/char/mem.c 1.23 vs edited =====
--- 1.23/drivers/char/mem.c Mon Aug 5 23:05:22 2002
+++ edited/drivers/char/mem.c Tue Oct 15 10:18:31 2002
@@ -132,6 +132,7 @@
{
unsigned long prot = pgprot_val(_prot);

+#if !defined(__arch_um__)
#if defined(__i386__) || defined(__x86_64__)
/* On PPro and successors, PCD alone doesn't always mean
uncached because of interactions with the MTRRs. PCD | PWT
@@ -152,7 +153,7 @@
else if (MMU_IS_040 || MMU_IS_060)
prot = (prot & _CACHEMASK040) | _PAGE_NOCACHE_S;
#endif
-
+#endif
return __pgprot(prot);
}

@@ -164,7 +165,7 @@
*/
static inline int noncached_address(unsigned long addr)
{
-#if defined(__i386__)
+#if defined(__i386__) && !defined(__arch_um__)
/*
* On the PPro and successors, the MTRRs are used to set
* memory types for physical addresses outside main memory,