From: Alan Cox Date: Sat, 22 Nov 2014 00:43:16 +0000 (+0000) Subject: mm: remove fairly useless and non-portable optimisation hack X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1d1f02e5fb2a39e172e24add81d5b08b7045f758;p=FUZIX.git mm: remove fairly useless and non-portable optimisation hack Far better to optimise usercopy functions if you need to --- diff --git a/Kernel/mm.c b/Kernel/mm.c index 8e722f6c..c8269fa6 100644 --- a/Kernel/mm.c +++ b/Kernel/mm.c @@ -2,19 +2,9 @@ #include #include -/* Will move into arch code: for most platforms is a 'don't care' as - switching is cheap */ -#define is_common(a,b) (udata.u_base >= (char *) PROGTOP) - -/* - * If System is in context or destination is in Common memory - * (F000-FFFF is always in context), simply copy the data. - * Otherwise perform Interbank move (uput) to User bank. - */ - unsigned int uputsys(unsigned char *from, unsigned int size) { - if (udata.u_sysio || is_common(from, size)) + if (udata.u_sysio) memcpy(udata.u_base, from, size); else uput(from, udata.u_base, size); @@ -23,7 +13,7 @@ unsigned int uputsys(unsigned char *from, unsigned int size) unsigned int ugetsys(unsigned char *to, unsigned int size) { - if (udata.u_sysio || is_common(from, size)) + if (udata.u_sysio) memcpy(to, udata.u_base, size); else uget(udata.u_base, to, size);