linux-mips
[Top] [All Lists]

Re: [PATCH v3] Virtual memory size detection for 64 bit MIPS CPUs

To: David Daney <ddaney@caviumnetworks.com>
Subject: Re: [PATCH v3] Virtual memory size detection for 64 bit MIPS CPUs
From: Guenter Roeck <guenter.roeck@ericsson.com>
Date: Mon, 1 Feb 2010 16:10:26 -0800
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, "Maciej W. Rozycki" <macro@linux-mips.org>
In-reply-to: <4B676755.10600@caviumnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1265064686-31278-1-git-send-email-guenter.roeck@ericsson.com> <4B676755.10600@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Feb 01, 2010 at 06:44:21PM -0500, David Daney wrote:
> Guenter Roeck wrote:
> > Linux kernel 2.6.32 and later allocates memory from the top of virtual 
> > memory
> > space.
> > 
> > This patch implements virtual memory size detection for 64 bit MIPS CPUs
> > to avoid resulting crashes.
> > 
> > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> [...]
> >  
> > +static inline void cpu_set_vmbits(struct cpuinfo_mips *c)
> > +{
> > +   if (cpu_has_64bits) {
> > +           write_c0_entryhi(0xfffffffffffff000ULL);
> 
> macro indicated that we need to avoid hazards here on R4000.
> 
> Perhaps adding:
> 
>       back_to_back_c0_hazard();
> 
Compiler already added a nop, so I thought it wasn't necessary.
Doesn't hurt either, so I'll put it in.

Guenter

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