[Top] [All Lists]

Re: [PATCH mips-for-linux-next] MIPS: check for D$ line size and CONFIG_

To: Ralf Baechle <>
Subject: Re: [PATCH mips-for-linux-next] MIPS: check for D$ line size and CONFIG_MIPS_L1_SHIFT
From: Florian Fainelli <>
Date: Wed, 22 Jan 2014 15:20:47 -0800
Cc: Linux-MIPS <>, John Crispin <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=bI4yZRoM58k91avb68BO+W1RKvsMc8k+tdjpPrHY2f4=; b=jAO/Pae8hytpeJrCtftooPblVeHP+1LuQnuv1ejYsKQ7ERH176JjZiCWsha+JbPKAr JhYttlggp95E/vr+l/WtUTXME6kpSFWp+kdx7R6IZ0+8ceLW004Wlf+PCrFC7ZNpBqcM UjtmPXIF7EDYt/Xm/c0lOJPRHr0cJnBgqsjz1f7QrsOYvi8IPuTptJh7SVTDlLiZmBXy orJpzKCxlloIy9ybRUJSqpwD3TKhEsaao3AnRM0kZ4tFI7A+HIqf+QVSK8Ke3DMH1ZH3 z3q4hUhg1k3jcXytIgWnZ1AtyTF3uxYRVe6ilIstXjcwyT4EDUXH15TC5HRXNSpVrmP2 Rstw==
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <> <>
2014/1/22 Ralf Baechle <>:
> On Wed, Jan 15, 2014 at 11:05:22AM -0800, Florian Fainelli wrote:
>> When a platform overrides the dcache_line_size detection in its
>> cpu-features-override.h file, check that the value matches
>> (1 << CONFIG_MIPS_L1_SHIFT) to ensure both settings are correct.
> Conceptually wrong - the two values serve an entirely different purpose.
> dcache_line_size is used for cache maintenance by the MIPS code while
> CONFIG_MIPS_L1_SHIFT - which has to be a constant due to the way it's
> being used - are being used to define L1_CACHE_SHIFT in <asm/cache.h>
> which in turn is being used primarily to optimize the memory layout of
> various structures for performance - and in case of IP27 we lie, set
> L1_CACHE_SHIFT to 7 which is the size of the S-cache.
> On top of that it breaks the ip27 build.
> And while we're at it, the use of CONFIG_MIPS_L1_SHIFT in
> arch/mips/kernel/ is fishy - but it needs a constant and
> this should be good enough for all users.

Fair enough, feel free to revert these commits and fix
while at it.

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