Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@mips.com>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Maarten ter Huurne <maarten@treewalker.org>,
	Paul Burton <paul.burton@mips.com>,
	<linux-kernel@vger.kernel.org>, <linux-mips@linux-mips.org>
Subject: Re: [PATCH v6 12/15] MIPS: JZ4770: Work around config2 misreporting associativity
Date: Wed, 10 Jan 2018 22:52:16 +0000	[thread overview]
Message-ID: <20180110225216.GW27409@jhogan-linux.mipstec.com> (raw)
In-Reply-To: <20180105182513.16248-13-paul@crapouillou.net>

[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]

On Fri, Jan 05, 2018 at 07:25:10PM +0100, Paul Cercueil wrote:
> From: Maarten ter Huurne <maarten@treewalker.org>
> 
> According to config2, the associativity would be 5-ways, but the
> documentation states 4-ways, which also matches the documented
> L2 cache size of 256 kB.
> 
> Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>

Hehe, nice

Reviewed-by: James Hogan <jhogan@kernel.org>

Cheers
James

> ---
>  arch/mips/mm/sc-mips.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
>  v2: No change
>  v3: No change
>  v4: Rebased on top of Linux 4.15-rc5
>  v5: No change
>  v6: No change
> 
> diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
> index 548acb7f8557..394673991bab 100644
> --- a/arch/mips/mm/sc-mips.c
> +++ b/arch/mips/mm/sc-mips.c
> @@ -16,6 +16,7 @@
>  #include <asm/mmu_context.h>
>  #include <asm/r4kcache.h>
>  #include <asm/mips-cps.h>
> +#include <asm/bootinfo.h>
>  
>  /*
>   * MIPS32/MIPS64 L2 cache handling
> @@ -220,6 +221,14 @@ static inline int __init mips_sc_probe(void)
>  	else
>  		return 0;
>  
> +	/*
> +	 * According to config2 it would be 5-ways, but that is contradicted
> +	 * by all documentation.
> +	 */
> +	if (current_cpu_type() == CPU_JZRISC &&
> +				mips_machtype == MACH_INGENIC_JZ4770)
> +		c->scache.ways = 4;
> +
>  	c->scache.waysize = c->scache.sets * c->scache.linesz;
>  	c->scache.waybit = __ffs(c->scache.waysize);
>  
> -- 
> 2.11.0
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: James Hogan <james.hogan@mips.com>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Maarten ter Huurne <maarten@treewalker.org>,
	Paul Burton <paul.burton@mips.com>,
	linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH v6 12/15] MIPS: JZ4770: Work around config2 misreporting associativity
Date: Wed, 10 Jan 2018 22:52:16 +0000	[thread overview]
Message-ID: <20180110225216.GW27409@jhogan-linux.mipstec.com> (raw)
Message-ID: <20180110225216.ksRt1z1PcO-4-TXYZ5t4p9SJByheSKnwzsuP3lQa220@z> (raw)
In-Reply-To: <20180105182513.16248-13-paul@crapouillou.net>

[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]

On Fri, Jan 05, 2018 at 07:25:10PM +0100, Paul Cercueil wrote:
> From: Maarten ter Huurne <maarten@treewalker.org>
> 
> According to config2, the associativity would be 5-ways, but the
> documentation states 4-ways, which also matches the documented
> L2 cache size of 256 kB.
> 
> Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>

Hehe, nice

Reviewed-by: James Hogan <jhogan@kernel.org>

Cheers
James

> ---
>  arch/mips/mm/sc-mips.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
>  v2: No change
>  v3: No change
>  v4: Rebased on top of Linux 4.15-rc5
>  v5: No change
>  v6: No change
> 
> diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
> index 548acb7f8557..394673991bab 100644
> --- a/arch/mips/mm/sc-mips.c
> +++ b/arch/mips/mm/sc-mips.c
> @@ -16,6 +16,7 @@
>  #include <asm/mmu_context.h>
>  #include <asm/r4kcache.h>
>  #include <asm/mips-cps.h>
> +#include <asm/bootinfo.h>
>  
>  /*
>   * MIPS32/MIPS64 L2 cache handling
> @@ -220,6 +221,14 @@ static inline int __init mips_sc_probe(void)
>  	else
>  		return 0;
>  
> +	/*
> +	 * According to config2 it would be 5-ways, but that is contradicted
> +	 * by all documentation.
> +	 */
> +	if (current_cpu_type() == CPU_JZRISC &&
> +				mips_machtype == MACH_INGENIC_JZ4770)
> +		c->scache.ways = 4;
> +
>  	c->scache.waysize = c->scache.sets * c->scache.linesz;
>  	c->scache.waybit = __ffs(c->scache.waysize);
>  
> -- 
> 2.11.0
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-01-10 22:54 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-02 15:08 [PATCH v5 01/15] clk: ingenic: Use const pointer to clk_ops in struct Paul Cercueil
2018-01-02 15:08 ` [PATCH v5 02/15] clk: ingenic: Fix recalc_rate for clocks with fixed divider Paul Cercueil
2018-01-02 15:08 ` [PATCH v5 03/15] clk: ingenic: support PLLs with no bypass bit Paul Cercueil
2018-01-02 15:08 ` [PATCH v5 04/15] clk: ingenic: Add code to enable/disable PLLs Paul Cercueil
2018-01-02 15:08 ` [PATCH v5 05/15] dt-bindings: clock: Add jz4770-cgu.h header Paul Cercueil
2018-01-05 16:34   ` Rob Herring
2018-01-02 15:08 ` [PATCH v5 06/15] clk: Add Ingenic jz4770 CGU driver Paul Cercueil
2018-01-02 15:08 ` [PATCH v5 07/15] MIPS: Setup boot_command_line before plat_mem_setup Paul Cercueil
2018-01-02 17:05   ` Mathieu Malaterre
2018-01-02 15:08 ` [PATCH v5 08/15] MIPS: ingenic: Use common cmdline handling code Paul Cercueil
2018-01-02 15:58   ` PrasannaKumar Muralidharan
2018-01-02 15:08 ` [PATCH v5 09/15] MIPS: platform: add machtype IDs for more Ingenic SoCs Paul Cercueil
2018-01-02 15:59   ` PrasannaKumar Muralidharan
2018-01-02 15:08 ` [PATCH v5 10/15] MIPS: ingenic: Add machine info for supported boards Paul Cercueil
2018-01-02 16:02   ` PrasannaKumar Muralidharan
2018-01-02 16:32     ` Paul Cercueil
2018-01-02 15:08 ` [PATCH v5 11/15] MIPS: ingenic: Initial JZ4770 support Paul Cercueil
2018-01-02 16:09   ` PrasannaKumar Muralidharan
2018-01-02 15:08 ` [PATCH v5 12/15] MIPS: JZ4770: Work around config2 misreporting associativity Paul Cercueil
2018-01-02 15:08 ` [PATCH v5 13/15] MIPS: JZ4770: Workaround for corrupted DMA transfers Paul Cercueil
2018-01-02 16:45   ` PrasannaKumar Muralidharan
2018-01-05 18:03     ` Paul Cercueil
2018-01-02 15:08 ` [PATCH v5 14/15] devicetree/bindings: Add GCW vendor prefix Paul Cercueil
2018-01-02 15:08 ` [PATCH v5 15/15] MIPS: ingenic: Initial GCW Zero support Paul Cercueil
2018-01-02 17:04   ` Mathieu Malaterre
2018-01-05 18:24 ` [PATCH v6 00/15] JZ4770 SoC support Paul Cercueil
2018-01-05 18:24   ` [PATCH v6 01/15] clk: ingenic: Use const pointer to clk_ops in struct Paul Cercueil
2018-01-16 15:47     ` [PATCH v7 00/14] JZ4770 and GCW0 patchset Paul Cercueil
2018-01-16 15:47       ` [PATCH v7 01/14] clk: ingenic: Use const pointer to clk_ops in struct Paul Cercueil
2018-01-16 15:47       ` [PATCH v7 02/14] clk: ingenic: Fix recalc_rate for clocks with fixed divider Paul Cercueil
2018-01-16 15:47       ` [PATCH v7 03/14] clk: ingenic: support PLLs with no bypass bit Paul Cercueil
2018-01-16 15:47       ` [PATCH v7 04/14] clk: ingenic: Add code to enable/disable PLLs Paul Cercueil
2018-01-16 15:47       ` [PATCH v7 05/14] dt-bindings: clock: Add jz4770-cgu.h header Paul Cercueil
2018-01-16 15:47       ` [PATCH v7 06/14] clk: Add Ingenic jz4770 CGU driver Paul Cercueil
2018-01-16 15:47       ` [PATCH v7 07/14] MIPS: Setup boot_command_line before plat_mem_setup Paul Cercueil
2018-01-16 15:47       ` [PATCH v7 08/14] MIPS: ingenic: Use common cmdline handling code Paul Cercueil
2018-01-16 15:47       ` [PATCH v7 09/14] MIPS: platform: add machtype IDs for more Ingenic SoCs Paul Cercueil
2018-01-16 15:48       ` [PATCH v7 10/14] MIPS: ingenic: Detect machtype from SoC compatible string Paul Cercueil
2018-01-16 22:06         ` James Hogan
2018-01-16 15:48       ` [PATCH v7 11/14] MIPS: ingenic: Initial JZ4770 support Paul Cercueil
2018-01-17 21:28         ` James Hogan
2018-01-17 21:28           ` James Hogan
2018-01-18 17:14           ` Paul Cercueil
2018-01-18 20:30             ` James Hogan
2018-01-18 20:30               ` James Hogan
2018-01-16 15:48       ` [PATCH v7 12/14] MIPS: JZ4770: Work around config2 misreporting associativity Paul Cercueil
2018-01-16 15:48       ` [PATCH v7 13/14] devicetree/bindings: Add GCW vendor prefix Paul Cercueil
2018-01-16 15:48       ` [PATCH v7 14/14] MIPS: ingenic: Initial GCW Zero support Paul Cercueil
2018-02-01 15:31       ` [PATCH v7 00/14] JZ4770 and GCW0 patchset James Hogan
2018-01-05 18:25   ` [PATCH v6 02/15] clk: ingenic: Fix recalc_rate for clocks with fixed divider Paul Cercueil
2018-01-05 18:25   ` [PATCH v6 03/15] clk: ingenic: support PLLs with no bypass bit Paul Cercueil
2018-01-05 18:25   ` [PATCH v6 04/15] clk: ingenic: Add code to enable/disable PLLs Paul Cercueil
2018-01-05 18:25   ` [PATCH v6 05/15] dt-bindings: clock: Add jz4770-cgu.h header Paul Cercueil
2018-01-05 18:25   ` [PATCH v6 06/15] clk: Add Ingenic jz4770 CGU driver Paul Cercueil
2018-01-10 21:37     ` James Hogan
2018-01-10 21:37       ` James Hogan
2018-01-05 18:25   ` [PATCH v6 07/15] MIPS: Setup boot_command_line before plat_mem_setup Paul Cercueil
2018-01-05 18:25   ` [PATCH v6 08/15] MIPS: ingenic: Use common cmdline handling code Paul Cercueil
2018-01-10 22:16     ` James Hogan
2018-01-10 22:16       ` James Hogan
2018-01-05 18:25   ` [PATCH v6 09/15] MIPS: platform: add machtype IDs for more Ingenic SoCs Paul Cercueil
2018-01-10 22:19     ` James Hogan
2018-01-10 22:19       ` James Hogan
2018-01-05 18:25   ` [PATCH v6 10/15] MIPS: ingenic: Detect machtype from SoC compatible string Paul Cercueil
2018-01-10 22:27     ` James Hogan
2018-01-10 22:27       ` James Hogan
2018-01-16 14:06       ` Paul Cercueil
2018-01-05 18:25   ` [PATCH v6 11/15] MIPS: ingenic: Initial JZ4770 support Paul Cercueil
2018-01-10 22:42     ` James Hogan
2018-01-10 22:42       ` James Hogan
2018-01-05 18:25   ` [PATCH v6 12/15] MIPS: JZ4770: Work around config2 misreporting associativity Paul Cercueil
2018-01-10 22:52     ` James Hogan [this message]
2018-01-10 22:52       ` James Hogan
2018-01-05 18:25   ` [PATCH v6 13/15] MIPS: JZ4770: Workaround for corrupted DMA transfers Paul Cercueil
2018-01-10 23:20     ` James Hogan
2018-01-10 23:20       ` James Hogan
2018-01-16 14:10       ` Paul Cercueil
2018-01-05 18:25   ` [PATCH v6 14/15] devicetree/bindings: Add GCW vendor prefix Paul Cercueil
2018-01-05 18:25   ` [PATCH v6 15/15] MIPS: ingenic: Initial GCW Zero support Paul Cercueil
2018-01-07 16:18     ` Philippe Ombredanne
2018-01-10 22:59       ` Paul Cercueil
2018-01-23 10:31         ` Philippe Ombredanne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180110225216.GW27409@jhogan-linux.mipstec.com \
    --to=james.hogan@mips.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=maarten@treewalker.org \
    --cc=paul.burton@mips.com \
    --cc=paul@crapouillou.net \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox