linux-mips
[Top] [All Lists]

Re: [PATCH 2/2] MIPS: Optimize TLB handlers for Octeon CPUs

To: Jonas Gorski <jonas.gorski@gmail.com>
Subject: Re: [PATCH 2/2] MIPS: Optimize TLB handlers for Octeon CPUs
From: David Daney <ddaney@caviumnetworks.com>
Date: Wed, 19 Jan 2011 12:05:19 -0800
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <AANLkTi=aZSwQCVudjZrUoOZYGJscER8R3vOsRcgadw-_@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1293502077-9196-1-git-send-email-ddaney@caviumnetworks.com> <1293502077-9196-3-git-send-email-ddaney@caviumnetworks.com> <AANLkTinZZ2TziwkiBfhqV-3-VfXwU+EPx3OHsnTRVChT@mail.gmail.com> <4D373E5B.5010303@caviumnetworks.com> <AANLkTi=aZSwQCVudjZrUoOZYGJscER8R3vOsRcgadw-_@mail.gmail.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
On 01/19/2011 11:46 AM, Jonas Gorski wrote:
On 19 January 2011 20:41, David Daney<ddaney@caviumnetworks.com>  wrote:
On 01/19/2011 11:35 AM, Jonas Gorski wrote:

On 28/12/2010, David Daney<ddaney@caviumnetworks.com>    wrote:

+#if defined(CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE)&&    \
+    CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE>    0
(...)
+#else
+static bool scratchpad_available(void)
+{
+       return false;
+}
+static int scratchpad_offset(int i)
+{
+       BUG();
+}
+#endif

This seems to have broken the build for any non-octeon mips build:

   CC      arch/mips/mm/tlbex.o
cc1: warnings being treated as errors
arch/mips/mm/tlbex.c: In function 'scratchpad_offset':
arch/mips/mm/tlbex.c:112: error: no return statement in function
returning non-void


Can you tell me which version of GCC you are using?

I tested it with gcc-4.5.x, BUG() may have problems if builtin_unreachable
is not available.

That's probably it, It's a 4.3.3 (with code sourcery extensions, the
OpenWrt default one).


It is a bug in GCC-4.3. The proper fix is to add 'return 0;' after that BUG() statement.

I will prepare a patch.

David Daney

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