All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Jayachandran C <jayachandranc@netlogicmicro.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH 1/4] MIPS: Netlogic: XLP CPU support.
Date: Tue, 23 Aug 2011 14:46:06 +0200	[thread overview]
Message-ID: <20110823124606.GA20817@linux-mips.org> (raw)
In-Reply-To: <22a3c5f618c9213bbf24c9564a82d94c831def4e.1312024108.git.jayachandranc@netlogicmicro.com>

On Sat, Jul 30, 2011 at 06:58:08PM +0530, Jayachandran C wrote:

> +#if defined(CONFIG_CPU_XLR)
> +#define cpu_has_userlocal	0
> +#define cpu_has_dc_aliases	0
> +#define cpu_has_mips32r2	0
> +#define cpu_has_mips64r2	0
> +#elif defined(CONFIG_CPU_XLP)
> +#define cpu_has_userlocal	1
> +#define cpu_has_mips32r2	1
> +#define cpu_has_mips64r2	1
> +#define cpu_has_dc_aliases	1
> +#else
> +#error "Unknown Netlogic CPU"
> +#endif

If you remove this block altogether the kernel would do runtime probing.
One step closer towards a generic kernel for XLP and XLR.  Is that of
interest?

> --- a/arch/mips/mm/c-r4k.c
> +++ b/arch/mips/mm/c-r4k.c
> @@ -1235,6 +1235,10 @@ static void __cpuinit setup_scache(void)
>  		loongson2_sc_init();
>  		return;
>  #endif
> +	case CPU_XLP:
> +		/* don't need to worry about L2 fully coherent */
> +		sc_present = 0;
> +		break;

No need to add this because sc_present defaults to zero.

Or even better, just fill all the variables like the R10000 (which also
has a full coherent S-cache).  Due to the other cpu feature flags the
code will know that it doesn't have to do any cache maintenance.

That way diagnostic code and possibly some performance optimizations
can still use the cache data.

> diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
> index b6e1cff..0833a63 100644
> --- a/arch/mips/mm/tlbex.c
> +++ b/arch/mips/mm/tlbex.c
> @@ -484,6 +484,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
>  	case CPU_TX49XX:
>  	case CPU_PR4450:
>  	case CPU_XLR:
> +	case CPU_XLP:
>  		uasm_i_nop(p);

If the XLP is a MIPS64 R2 processor adding this code is unnecessary because
the cpu_has_mips_r2 if near the top of this function will handle the CPU.

  Ralf

  reply	other threads:[~2011-08-23 12:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-30 13:27 [PATCH 0/4] MIPS: Support for Netlogic XLP processors Jayachandran C
2011-07-30 13:28 ` [PATCH 1/4] MIPS: Netlogic: XLP CPU support Jayachandran C
2011-08-23 12:46   ` Ralf Baechle [this message]
2011-08-24  9:36     ` Jayachandran C.
2011-07-30 13:28 ` [PATCH 2/4] MIPS: Netlogic: Platform files for XLP processors Jayachandran C
2011-08-23 16:41   ` Ralf Baechle
2011-08-24  8:54     ` Jayachandran C.
2011-07-30 13:28 ` [PATCH 3/4] MIPS: Netlogic: Build support for netlogic XLP Jayachandran C
2011-07-30 13:29 ` [PATCH 4/4] MIPS: Netlogic: Add default XLP config Jayachandran C
  -- strict thread matches above, loose matches on Subject: below --
2011-09-04 18:10 [PATCH 0/4] MIPS: Support for Netlogic XLP processors Jayachandran C
2011-09-04 18:10 ` [PATCH 1/4] MIPS: Netlogic: XLP CPU support Jayachandran C

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=20110823124606.GA20817@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=jayachandranc@netlogicmicro.com \
    --cc=linux-mips@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.