linux-mips
[Top] [All Lists]

Re: [PATCH v3,2/9] MIPS: Optimise core library functions for microMIPS.

To: "Steven J. Hill" <sjhill@mips.com>
Subject: Re: [PATCH v3,2/9] MIPS: Optimise core library functions for microMIPS.
From: David Daney <david.daney@cavium.com>
Date: Mon, 21 May 2012 10:55:54 -0700
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <1337615935-30482-1-git-send-email-sjhill@mips.com>
References: <1337615935-30482-1-git-send-email-sjhill@mips.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
[...]
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -45,6 +45,12 @@
  #define HUGETLB_PAGE_ORDER    ({BUILD_BUG(); 0; })
  #endif /* CONFIG_HUGETLB_PAGE */

+/*
+ * Clear and copy array sizes for micro-assembly of clear_page/copy_page.
+ */
+#define CLEAR_PAGE_ARRAY_SIZE  288
+#define COPY_PAGE_ARRAY_SIZE   1344
+

This is not so clean.  page.h really shouldn't have things like this.

Just put a label at the beginning and end of the code and have the compiler calculate the size from the difference.

David Daney

<Prev in Thread] Current Thread [Next in Thread>