AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20081103184727.0b1308a8@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:exch1.onstor.net
NSV:
SSH:
R:<bfisher@onstor.com>,<bfisher@onstor.com>,<maxim.kozlovsky@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	490FAAE3.3060802@onstor.com
X-Sylpheed-End-Special-Headers: 1
Date: Mon, 3 Nov 2008 18:48:12 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: Bill Fisher <bfisher@onstor.com>
Cc: Bill Fisher <bfisher@onstor.com>, Maxim Kozlovsky
 <maxim.kozlovsky@onstor.com>
Subject: Re: Onstor prom support required for TuxRx SMP kernel
Message-ID: <20081103184812.2db43358@ripper.onstor.net>
In-Reply-To: <490FAAE3.3060802@onstor.com>
References: <490FAAE3.3060802@onstor.com>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

MT is the multithreaded mips processors designed by MIPS in recent
years.  So no, we don't have MT.  The start_secondary and so forth I
think I never actually sat down and wrote.  There must be some routine
in our prom that does this, and if not, then in our runtime.  Shouldn't
be too difficult to hack together anyway.

On Mon, 3 Nov 2008 17:52:35 -0800 Bill Fisher <bfisher@onstor.com>
wrote:

> Andy:
> 
> After decoding all the various SIBYTE_XXX config options and using
> the SIBYTE_BIGSUR option, the kernel assumes that we have the olf SGI
> ARC prom support for the following undefines:
> 
> arch/mips/kernel/built-in.o: In function `start_secondary':
> (.text+0x97c0): undefined reference to `prom_init_secondary'
> arch/mips/kernel/built-in.o: In function `start_secondary':
> (.text+0x97c0): relocation truncated to fit: R_MIPS_26 against 
> `prom_init_secondary'
> arch/mips/kernel/built-in.o: In function `start_secondary':
> (.text+0x97f4): undefined reference to `prom_smp_finish'
> arch/mips/kernel/built-in.o: In function `start_secondary':
> (.text+0x97f4): relocation truncated to fit: R_MIPS_26 against 
> `prom_smp_finish'
> arch/mips/kernel/built-in.o: In function `setup_arch':
> (.init.text+0x1204): undefined reference to `prom_init'
> arch/mips/kernel/built-in.o: In function `setup_arch':
> (.init.text+0x1204): relocation truncated to fit: R_MIPS_26 against 
> `prom_init'
> arch/mips/kernel/built-in.o: In function `setup_arch':
> (.init.text+0x153c): undefined reference to `plat_smp_setup'
> arch/mips/kernel/built-in.o: In function `setup_arch':
> (.init.text+0x153c): relocation truncated to fit: R_MIPS_26 against 
> `plat_smp_setup'
> arch/mips/kernel/built-in.o: In function `__cpu_up':
> (.init.text+0x204c): undefined reference to `prom_boot_secondary'
> arch/mips/kernel/built-in.o: In function `__cpu_up':
> (.init.text+0x204c): relocation truncated to fit: R_MIPS_26 against 
> `prom_boot_secondary'
> arch/mips/kernel/built-in.o: In function `smp_cpus_done':
> (.init.text+0x212c): undefined reference to `prom_cpus_done'
> arch/mips/kernel/built-in.o: In function `smp_cpus_done':
> (.init.text+0x212c): relocation truncated to fit: R_MIPS_26 against 
> `prom_cpus_done'
> arch/mips/kernel/built-in.o: In function `smp_prepare_cpus':
> (.init.text+0x21cc): undefined reference to `plat_prepare_cpus'
> arch/mips/kernel/built-in.o: In function `smp_prepare_cpus':
> (.init.text+0x21cc): relocation truncated to fit: R_MIPS_26 against 
> `plat_prepare_cpus'
> arch/mips/mm/built-in.o: In function `free_initmem':
> (.text+0x628): undefined reference to `prom_free_prom_memory'
> arch/mips/mm/built-in.o: In function `free_initmem':
> (.text+0x628): relocation truncated to fit: R_MIPS_26 against 
> `prom_free_prom_memory'
> arch/mips/lib/lib.a(promlib.o): In function `prom_printf':
> promlib.c:(.text+0x50): undefined reference to `prom_putchar'
> promlib.c:(.text+0x50): relocation truncated to fit: R_MIPS_26
> against `prom_putchar'
> promlib.c:(.text+0x6c): undefined reference to `prom_putchar'
> promlib.c:(.text+0x6c): relocation truncated to fit: R_MIPS_26
> against `prom_putchar'
> promlib.c:(.text+0x78): undefined reference to `prom_putchar'
> promlib.c:(.text+0x78): additional relocation overflows omitted from
> the output
> make: *** [.tmp_vmlinux1] Error 1
> 
> ================
> 
> Under the cougar kernel, you implemented these procedures as per the
> OnStor prom support. Looking at the default kernel, these procedures
> are defined under the standard arch/mips/kernel/{smp.c,smp-mt.c}
> files containing those procedures.
> 
> However, the Makefile under arch/mips/kernel/Makefile contains:
> 
> obj-$(CONFIG_SMP)               += smp.o
> 
> obj-$(CONFIG_MIPS_MT)           += mips-mt.o
> obj-$(CONFIG_MIPS_MT_SMTC)      += smtc.o smtc-asm.o smtc-proc.o
> obj-$(CONFIG_MIPS_MT_SMP)       += smp-mt.o
> 
> ===============
> 
> The .config file contains:
> CONFIG_MIPS_MT_DISABLED=y
> # CONFIG_MIPS_MT_SMP is not set
> # CONFIG_MIPS_MT_SMTC is not set
> # CONFIG_MIPS_VPE_LOADER is not set
> # CONFIG_64BIT_PHYS_ADDR is not set
> 
> 
> hence we get unsatisfied externals.
> 
> ==========================
> 
> So, it seems we need to big the bullet and "steal" your versions of
> these procedures from Cougar since we are not using the MIPS MT_SMP
> support assumed in the ARC prom's.
> 
> Do you agree?
> 
> Later,
> 
> 
