All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Chad Reese <kreese@caviumnetworks.com>
Cc: ddaney@caviumnetworks.com, linux-mips@linux-mips.org,
	Tomaso Paoletti <tpaoletti@caviumnetworks.com>,
	Paul Gortmaker <Paul.Gortmaker@windriver.com>
Subject: Re: [PATCH 35/37] Set c0 status for ST0_KX on Cavium OCTEON.
Date: Sun, 26 Oct 2008 22:33:31 +0000	[thread overview]
Message-ID: <20081026223331.GA21572@linux-mips.org> (raw)
In-Reply-To: <49051A78.8080601@caviumnetworks.com>

On Sun, Oct 26, 2008 at 06:33:44PM -0700, Chad Reese wrote:

> >> -#ifdef CONFIG_64BIT
> >> +#if defined(CONFIG_64BIT) || defined(CONFIG_CPU_CAVIUM_OCTEON)
> >> +	/*
> >> +	 * Note: We always set ST0_KX on Octeon since IO addresses are at
> >> +	 * 64bit addresses. Keep in mind this also moves the TLB handler.
> >> +	 */
> >>  	setup_c0_status ST0_KX 0
> > 
> > That's a bit odd - on 64-bit kernels KX would be set anyway and on 32-bit
> > kernels would be corrupted by exceptions or interrupts, so 64-bit
> > addresses are not safe to use on 32-bit kernels for most part.
> > 
> > 32-bit virtual addresses mapped to a non-compat address otoh will work fine
> > without KX set.
> > 
> >   Ralf
> 
> The Octeon IO space regions are significantly larger than a 32bit kernel
> could tlb map easily. The entire range takes 49 bits to address. As a
> not particularly clean, but working alternative, we enable 64bit
> addressing in the kernel and used XKPHYS to access IO. Every access was
> surrounded by a local_irq_save/local_irq_restore. Since this is ugly to
> the extreme, maybe we should drop being able to boot a 32bit kernel on
> Octeon until something better is worked out.

That address space may be huge but for any given application you're
probably only ever going to access a tiny fraction of it - in particular
one where the kernel model of choice is a 32-bit kernel.

If these assumptions don't hold for the Cavium, then I ditching 32-bit
kernels is the obvious choice.  We've given up on 32-bit kernels for the
SGI O2 for example - it was just too ugly, too painful.  For very small
configurations of SGI Origins it would have been possible similarly for
small Broadcom Sibyte configs - but in practice these days we use 64-bit
kernels.  32-bit is just so yesterday and the 64-bit Linux/MIPS kernels
are now nearly a decade old.

  Ralf

  parent reply	other threads:[~2008-10-26 22:33 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-24  0:56 [PATCH 00/37] Add Cavium OCTEON processor support ddaney
2008-10-24  0:56 ` [PATCH 01/37] Add Cavium OCTEON processor support files to arch/mips/cavium-octeon ddaney
2008-10-24  0:56 ` [PATCH 02/37] Add Cavium OCTEON files to arch/mips/include/asm/mach-cavium-octeon ddaney
2008-10-24  0:56 ` [PATCH 03/37] Add Cavium OCTEON processor support files to arch/mips/kernel ddaney
2008-10-24  0:56 ` [PATCH 04/37] Add Cavium OCTEON processor support files to arch/mips/mm ddaney
2008-10-24  0:56 ` [PATCH 05/37] Add Cavium OCTEON processor support files to and arch/mips/cavium-octeon/executive ddaney
2008-10-24  0:56 ` [PATCH 06/37] Add Cavium OCTEON processor CSR definitions ddaney
2008-10-24  0:56 ` [PATCH 07/37] Don't assume boot CPU is CPU0 if MIPS_DISABLE_BOOT_CPU_ZERO set ddaney
2008-10-24  0:56 ` [PATCH 08/37] For Cavium OCTEON handle hazzards as per the R10000 handling ddaney
2008-10-24 10:46   ` Sergei Shtylyov
2008-10-24  0:56 ` [PATCH 09/37] Enable mips32 style bitops for Cavium OCTEON ddaney
2008-10-24  0:56 ` [PATCH 10/37] Cavium OCTEON: Set hwrena and lazily restore CP2 state ddaney
2008-10-24  0:56 ` [PATCH 11/37] Cavium OCTEON: ebase isn't just CAC_BASE ddaney
2008-10-24 19:56   ` Maciej W. Rozycki
2008-10-24 20:12     ` David Daney
2008-10-24  0:56 ` [PATCH 12/37] Add Cavium OCTEON to arch/mips/Kconfig ddaney
2008-10-24  0:56 ` [PATCH 13/37] Add Cavium OCTEON processor constants ddaney
2008-10-24  0:56 ` [PATCH 14/37] Rewrite cpu_to_name so it has one statement per line ddaney
2008-10-24  0:56 ` [PATCH 15/37] Probe for Cavium OCTEON CPUs ddaney
2008-10-24  0:56 ` [PATCH 16/37] MIPS: Hook Cavium OCTEON cache init into cache.c ddaney
2008-10-24  0:56 ` [PATCH 17/37] cavium: Hook Cavium specifics into main arch/mips dir ddaney
2008-10-24  0:56 ` [PATCH 18/37] Cavium OCTEON modify core io.h macros to account for the Octeon Errata Core-301 ddaney
2008-10-24  0:56 ` [PATCH 19/37] Cavium OCTEON: increase MAX_DMA address ddaney
2008-10-24  0:56 ` [PATCH 20/37] Cavium OCTEON: add in icache and dcache error functions ddaney
2008-10-24  0:56 ` [PATCH 21/37] Cavium OCTEON: Add cop2/cvmseg state entries to processor.h ddaney
2008-10-24  0:56 ` [PATCH 22/37] Add Cavium OCTEON specific registers to ptrace.h and asm-offsets.c ddaney
2008-10-24  0:56 ` [PATCH 23/37] Add SMP_ICACHE_FLUSH for the Cavium CPU family ddaney
2008-10-24  0:56 ` [PATCH 24/37] Cavium OCTEON: PT vs MFC0 reorder, multiplier state preservation ddaney
2008-10-24  0:56 ` [PATCH 25/37] Add Cavium OCTEON irq hazard in asmmacro.h ddaney
2008-10-24  0:56 ` [PATCH 26/37] Compute branch returns for Cavium OCTEON specific branch instructions ddaney
2008-10-24  0:56 ` [PATCH 27/37] Add Cavium OCTEON slot into proper tlb category ddaney
2008-10-24  0:56 ` [PATCH 28/37] Cavium OCTEON FPU EMU exception as TLB exception ddaney
2008-10-24 10:39   ` Sergei Shtylyov
2008-10-24 13:11     ` Paul Gortmaker
2008-10-24 17:01     ` David Daney
2008-10-24  0:56 ` [PATCH 29/37] Don't clobber spinlocks in 8250 ddaney
2008-10-24 20:12   ` Maciej W. Rozycki
2008-10-24 20:16     ` David Daney
2008-10-24  0:56 ` [PATCH 30/37] Generic 8250 serial driver changes to support future OCTEON serial patches ddaney
2008-10-24  0:56 ` [PATCH 31/37] Allow port type to be specified when calling serial8250_register_port ddaney
2008-10-24  0:56 ` [PATCH 32/37] Allow port type to specify bugs that are not probed for ddaney
2008-10-24  0:56 ` [PATCH 33/37] 8250 serial driver changes for Cavium OCTEON ddaney
2008-10-24  0:56 ` [PATCH 34/37] Adjust the dma-common.c platform hooks ddaney
2008-10-24  0:56 ` [PATCH 35/37] Set c0 status for ST0_KX on Cavium OCTEON ddaney
2008-10-26 12:48   ` Ralf Baechle
2008-10-27  1:33     ` Chad Reese
2008-10-26 18:51       ` Maciej W. Rozycki
2008-10-26 22:33       ` Ralf Baechle [this message]
2008-10-24  0:57 ` [PATCH 36/37] Cavium OCTEON: pmd_none - use pmd_val() in pmd_val() ddaney
2008-10-24 13:00   ` Paul Gortmaker
2008-10-24 15:55     ` David Daney
2008-10-24 15:12   ` Sergei Shtylyov
2008-10-24  0:57 ` [PATCH 37/37] Add defconfig for Cavium OCTEON ddaney

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=20081026223331.GA21572@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=Paul.Gortmaker@windriver.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=kreese@caviumnetworks.com \
    --cc=linux-mips@linux-mips.org \
    --cc=tpaoletti@caviumnetworks.com \
    /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.