public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: pjordan@whitehorse.blackwire.com
To: linux-kernel@vger.kernel.org
Subject: kernel_unaligned_trap_fault -> undefined - sparc64
Date: Wed, 2 Jun 2004 10:53:22 -0700	[thread overview]
Message-ID: <20040602175322.GA21878@panama> (raw)

  LD      .tmp_vmlinux1
arch/sparc64/kernel/built-in.o(__ex_table+0x3c4): undefined reference to `kernel_unaligned_trap_fault'
arch/sparc64/kernel/built-in.o(__ex_table+0x3cc): undefined reference to `kernel_unaligned_trap_fault'
arch/sparc64/kernel/built-in.o(__ex_table+0x3d4): undefined reference to `kernel_unaligned_trap_fault'
arch/sparc64/kernel/built-in.o(__ex_table+0x3dc): undefined reference to `kernel_unaligned_trap_fault'
arch/sparc64/kernel/built-in.o(__ex_table+0x3e4): undefined reference to `kernel_unaligned_trap_fault'
arch/sparc64/kernel/built-in.o(__ex_table+0x3ec): more undefined references to `kernel_unaligned_trap_fault' follow
make: *** [.tmp_vmlinux1] Error 1



I am using Dan Kegel's "crosstools" to build this kernel using 
 "make ARCH=sparc64 CC=/opt/crosstool/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin/sparc64-unknown-linux-gnu-gcc"
  to build it.

Oh yeah, I also had to comment out line 449 of include/asm/unistd.h to get it
to compile:

/* static __inline__ _syscall1(int,_exit,int,exitcode) */


Looking at arch/sparc64/kernel/unaligned.c lines 408 - 451, if I simply comment
out the 'kernel_unaligned_trap_fault' I can get the thing to build,
and it even boots on an E4500. (ultrasparc/sun4u)
[ s/kernel_unaligned_trap_fault)/)/ is sufficient for a build :) ]

unaligned.c 408-451:
===================

asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn, unsigned long sfar, unsigned long sfsr)
{
        enum direction dir = decode_direction(insn);
        int size = decode_access_size(insn);

        if (!ok_for_kernel(insn) || dir == both) {
                printk("Unsupported unaligned load/store trap for kernel at <%016lx>.\n",
                       regs->tpc);
                unaligned_panic("Kernel does fpu/atomic unaligned load/store.", regs);
                __asm__ __volatile__ ( "\n"
"kernel_unaligned_trap_fault:\n\t"
                "mov    %0, %%o0\n\t"
                "call   kernel_mna_trap_fault\n\t"
                " mov   %1, %%o1\n\t"
                :
                : "r" (regs), "r" (insn)
                : "o0", "o1", "o2", "o3", "o4", "o5", "o7",
                  "g1", "g2", "g3", "g4", "g5", "g7", "cc");
        } else {
                unsigned long addr = compute_effective_address(regs, insn, ((insn >> 25) & 0x1f));

#ifdef DEBUG_MNA
                printk("KMNA: pc=%016lx [dir=%s addr=%016lx size=%d] retpc[%016lx]\n",
                       regs->tpc, dirstrings[dir], addr, size, regs->u_regs[UREG_RETPC]);
#endif
                switch (dir) {
                case load:
                        do_integer_load(fetch_reg_addr(((insn>>25)&0x1f), regs),
                                        size, (unsigned long *) addr,
                                        decode_signedness(insn), decode_asi(insn, regs),
                                        kernel_unaligned_trap_fault);
                        break;

                case store:
                        do_integer_store(((insn>>25)&0x1f), size,
                                         (unsigned long *) addr, regs,
                                         decode_asi(insn, regs),
                                         kernel_unaligned_trap_fault);
                        break;
#if 0 /* unsupported */
                case both:
                        do_atomic(fetch_reg_addr(((insn>>25)&0x1f), regs),
                                  (unsigned long *) addr,
                                          kernel_unaligned_trap_fault);
                        break;
#endif
                default:
                        panic("Impossible kernel unaligned trap.");
                        /* Not reached... */
                }
                advance(regs);
        }
}



===============

/opt/crosstool/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/bin/sparc64-unknown-linux-gnu-gcc --version
sparc64-unknown-linux-gnu-gcc (GCC) 3.4.0

  Straight out of "crosstools".  Running on a freshly installed debian sid
with 2.6.6 on ix86.

I have another problem now as well with NULL pointer dereference
in drivers/char/vt.c line 2891.

"Badness in poke_blanked_console" - is that an unrelated issue?

Thanks,

Peter

             reply	other threads:[~2004-06-02 18:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-02 17:53 pjordan [this message]
2004-06-02 22:37 ` kernel_unaligned_trap_fault -> undefined - sparc64 David S. Miller

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=20040602175322.GA21878@panama \
    --to=pjordan@whitehorse.blackwire.com \
    --cc=linux-kernel@vger.kernel.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