Skip to contentSkip to conversation

2.5.24 doesn't compile on Alpha

PATCH Jurriaan on Alpha 4 participants 11 messages Jun 21, 2002 – Jun 24, 2002 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

After applying this diff to get past the most obvious errors:

[yes, it applies clean against 2.5.24 still]

drivers/char/rtc.c +1 -0
diff -Br -b -U 3 -N linux-2.5.20/drivers/char/rtc.c linux-2.5.20-jwk/drivers/char/rtc.c
@@ -72,6 +72,7 @@
 #include <linux/sysctl.h>
 
 #include <asm/io.h>
+#include <asm/irq.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
include/asm-alpha/bitops.h +6 -0
diff -Br -b -U 3 -N linux-2.5.20/include/asm-alpha/bitops.h linux-2.5.20-jwk/include/asm-alpha/bitops.h
@@ -451,6 +451,12 @@
 }
 
 /*
+ * fls: find last bit set.
+ */
+
+#define fls(x) generic_fls(x)
+
+/*
  * The optimizer actually does good code for this case.
  */
 #define find_first_zero_bit(addr, size) \
include/asm-alpha/irq.h +1 -0
diff -Br -b -U 3 -N linux-2.5.20/include/asm-alpha/irq.h linux-2.5.20-jwk/include/asm-alpha/irq.h
@@ -37,6 +37,7 @@
       defined(CONFIG_ALPHA_RX164)     || \
       defined(CONFIG_ALPHA_NORITAKE)
 # define NR_IRQS	48
+# define RTC_IRQ	8
 
 #elif defined(CONFIG_ALPHA_SABLE)     || \
       defined(CONFIG_ALPHA_SX164)
include/asm-alpha/page.h +2 -2
diff -Br -b -U 3 -N linux-2.5.20/include/asm-alpha/page.h linux-2.5.20-jwk/include/asm-alpha/page.h
@@ -15,10 +15,10 @@
 #define STRICT_MM_TYPECHECKS
 
 extern void clear_page(void *page);
-#define clear_user_page(page, vaddr)	clear_page(page)
+#define clear_user_page(page, vaddr, pg)	clear_page(page)
 
 extern void copy_page(void * _to, void * _from);
-#define copy_user_page(to, from, vaddr)	copy_page(to, from)
+#define copy_user_page(to, from, vaddr, pg)	copy_page(to, from)
 
 #ifdef STRICT_MM_TYPECHECKS
 /*

I still get errors:

alpha:/usr/src/linux-2.5.24# make boot
make[1]: Entering directory `/usr/src/linux-2.5.24/scripts'
make[1]: Leaving directory `/usr/src/linux-2.5.24/scripts'
make[1]: Entering directory `/usr/src/linux-2.5.24/arch/alpha/kernel'
  gcc -Wp,-MD,./.asm-offsets.s.d -D__KERNEL__ -I/usr/src/linux-2.5.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-fra
me-pointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -nostdinc -iwithprefix include    -DKBU
ILD_BASENAME=asm_offsets   -S -o asm-offsets.s asm-offsets.c
make[1]: Leaving directory `/usr/src/linux-2.5.24/arch/alpha/kernel'
  Generating include/asm-alpha/asm_offsets.h (unchanged)
  Starting the build. KBUILD_BUILTIN=1 KBUILD_MODULES=
make[1]: Entering directory `/usr/src/linux-2.5.24/init'
  gcc -Wp,-MD,./.main.o.d -D__KERNEL__ -I/usr/src/linux-2.5.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-poin
ter -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -nostdinc -iwithprefix include    -DKBUILD_BAS
ENAME=main   -c -o main.o main.c
  Generating /usr/src/linux-2.5.24/include/linux/compile.h (updated)
  gcc -Wp,-MD,./.version.o.d -D__KERNEL__ -I/usr/src/linux-2.5.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-p
ointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -nostdinc -iwithprefix include    -DKBUILD_
BASENAME=version   -c -o version.o version.c
  gcc -Wp,-MD,./.do_mounts.o.d -D__KERNEL__ -I/usr/src/linux-2.5.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame
-pointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -nostdinc -iwithprefix include    -DKBUIL
D_BASENAME=do_mounts   -c -o do_mounts.o do_mounts.c
   ld  -r -o init.o main.o version.o do_mounts.o
make[1]: Leaving directory `/usr/src/linux-2.5.24/init'
make[1]: Entering directory `/usr/src/linux-2.5.24/kernel'
  gcc -Wp,-MD,./.sched.o.d -D__KERNEL__ -I/usr/src/linux-2.5.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-poi
nter -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -nostdinc -iwithprefix include    -fno-omit-f
rame-pointer -DKBUILD_BASENAME=sched   -c -o sched.o sched.c
sched.c:469: macro `switch_to' used with too many (3) args
In file included from sched.c:25:
/usr/src/linux-2.5.24/include/asm/mmu_context.h: In function `init_new_context':
/usr/src/linux-2.5.24/include/asm/mmu_context.h:230: `smp_num_cpus' undeclared (first use in this function)
/usr/src/linux-2.5.24/include/asm/mmu_context.h:230: (Each undeclared identifier is reported only once
/usr/src/linux-2.5.24/include/asm/mmu_context.h:230: for each function it appears in.)
/usr/src/linux-2.5.24/include/asm/mmu_context.h:231: warning: implicit declaration of function `cpu_logical_map'
sched.c: In function `schedule':
sched.c:819: warning: implicit declaration of function `prepare_arch_schedule'
sched.c:876: warning: implicit declaration of function `prepare_arch_switch'
sched.c:880: warning: implicit declaration of function `finish_arch_switch'
sched.c:883: warning: implicit declaration of function `finish_arch_schedule'
make[1]: *** [sched.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.5.24/kernel'
make: *** [kernel] Error 2
alpha:/usr/src/linux-2.5.24#

I know I can fix the smp_num_cpus thing, but the prepare_arch_switch() etc. things are another matter. Every now and again I see a post to lkml for the Alpha, which suggest some people succeed in compiling it. Any hints?

Thanks,
Jurriaan

Signature · 3 lines
I'm a mean green mother from outer space.
        Audrey II, The Little Shop of Horrors
Debian GNU/Linux 2.4.19p10 on Alpha 990 bogomips load:0.66 0.17 0.36
#1 lore raw

2.5.24 on alpha; fls redefined!? HELP NEEDED

Hi all!

Where comes this from and _why_???

/usr/src/linux-2.5.24/include/asm/bitops.h:471:1: warning: "fls" redefined

^^^^^^^^^^^^^^^^^^^^^^^^ /usr/src/linux-2.5.24/include/asm/bitops.h:329:1: warning: this is the location of the previous definition
gcc -Wp,-MD,./.capability.o.d -D__KERNEL__
-I/usr/src/linux-2.5.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mno-fp-regs -ffixed-8 -msmall-data -mcpu=ev5 -Wa,-mev6 -nostdinc
-iwithprefix include -DKBUILD_BASENAME=capability -c -o
capability.o capability.c
In file included from /usr/src/linux-2.5.24/include/linux/bitops.h:3,
from
/usr/src/linux-2.5.24/include/linux/thread_info.h:10,

                 from /usr/src/linux-2.5.24/include/linux/spinlock.h:7,
                 from
/usr/src/linux-2.5.24/include/linux/capability.h:44,
                 from /usr/src/linux-2.5.24/include/linux/sched.h:9,
                 from /usr/src/linux-2.5.24/include/linux/mm.h:4,
                 from capability.c:10:

I get this error very often... I guess in all files in include/asm-alpha/ ...

-Oliver

#2 lore raw

RE: 2.5.24 on alpha; fls redefined!? HELP NEEDED

Quoted 5 lines · Oliver Pitzeier

Where comes this from and _why_???

/usr/src/linux-2.5.24/include/asm/bitops.h:471:1: warning:
"fls" redefined
^^^^^^^^^^^^^^^^^^^^^^^^

OK. Found it... Here...

    467 /*
    468  * fls: find last bit set.
    469  */
    470
    471 #define fls(x) generic_fls(x)

I took it out. I guess it's not needed anymore because of this:

    318 /*
    319  * fls: find last bit set.
    320  */
    321 #if defined(__alpha_cix__) && defined(__alpha_fix__)
    322 static inline int fls(int word)
    323 {
    324         long result;
    325         __asm__("ctlz %1,%0" : "=r"(result) : "r"(word &
0xffffffff));
    326         return 64 - result;
    327 }
    328 #else
    329 #define fls     generic_fls
    330 #endif

Right? :o)

Greetz,
Oliver

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

From: Oliver Pitzeier <[email protected]>
Date: Fri, Jun 21, 2002 at 02:22:42PM +0200

Quoted 9 lines

Hi Thunder!
[ ... ]

Quoted 1 line

`smp_num_cpus' undeclared (first use in this function)

[ .... ]

Quoted 2 lines

I know I can fix the smp_num_cpus thing [ ... ]

Yes!? How????

I tried #define smp_num_cpus 1 in include/asm-alpha/smp.h (the non-smp section) but the same line in include/asm/mmu_context.h works - for a while.

ALPHA :diff -Br -b -U 3 -N mmu_context.org mmu_context.h

mmu_context.h Fri Jun 21 16:09:33 2002 renamed from mmu_context.org Fri Jun 21 16:16:56 2002 +1 -0
@@ -89,6 +89,7 @@
 #define cpu_last_asn(cpuid)    (cpu_data[cpuid].last_asn)
 #else
 extern unsigned long last_asn;
+#define smp_num_cpus   1
 #define cpu_last_asn(cpuid)    last_asn
 #endif /* CONFIG_SMP */
 

But after that while:

make[1]: Entering directory `/usr/src/linux-2.5.24/mm'
gcc -Wp,-MD,./.memory.o.d -D__KERNEL__ -I/usr/src/linux-2.5.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-po
inter -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -nostdinc -iwithprefix include -DKBUILD_B
ASENAME=memory -c -o memory.o memory.c
In file included from /usr/src/linux-2.5.24/include/asm/tlb.h:1,

                 from memory.c:50:

/usr/src/linux-2.5.24/include/asm-generic/tlb.h: In function `tlb_gather_mmu':
/usr/src/linux-2.5.24/include/asm-generic/tlb.h:57: warning: large integer implicitly truncated to unsigned type /usr/src/linux-2.5.24/include/asm-generic/tlb.h: In function `tlb_flush_mmu':
/usr/src/linux-2.5.24/include/asm-generic/tlb.h:69: warning: implicit declaration of function tlb_flush' memory.c: In function free_one_pmd':
memory.c:93: warning: implicit declaration of function `pte_free_tlb'
memory.c: In function `free_one_pgd':
memory.c:114: warning: implicit declaration of function `pmd_free_tlb'
memory.c: In function `copy_page_range':
memory.c:267: warning: implicit declaration of function `pte_pfn'
memory.c:268: warning: implicit declaration of function `pfn_valid'
memory.c:270: warning: implicit declaration of function `pfn_to_page'
memory.c:270: warning: assignment makes pointer from integer without a cast
memory.c: In function `zap_pte_range':
memory.c:338: warning: implicit declaration of function `tlb_remove_tlb_entry'
memory.c:340: warning: initialization makes pointer from integer without a cast
memory.c: In function `unmap_page_range':
memory.c:386: warning: implicit declaration of function `tlb_start_vma'
memory.c:392: warning: implicit declaration of function `tlb_end_vma'
memory.c: In function `follow_page':
memory.c:458: warning: return makes pointer from integer without a cast
memory.c: In function `remap_pte_range':
memory.c:845: invalid type argument of `->'
memory.c:846: warning: implicit declaration of function `pfn_pte'
memory.c:846: incompatible types in assignment
memory.c: In function `do_wp_page':
memory.c:961: warning: assignment makes pointer from integer without a cast
make[1]: *** [memory.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.5.24/mm'
make: *** [mm] Error 2
alpha:/usr/src/linux-2.5.24#

Jurriaan

Signature · 4 lines
I believe in coincidence. Coincidences happen every day. But I don't
trust coincidences.
	Garak - DS9
Debian GNU/Linux 2.4.19p10 on Alpha 990 bogomips load:0.52 0.48 0.46
#5 lore raw
Quoted 3 lines · Jurriaan on Alpha

I tried #define smp_num_cpus 1 in include/asm-alpha/smp.h (the non-smp section) but the same line in include/asm/mmu_context.h works - for a while.

I'm running 2.5.24 on sx164 with following (unfinished - SMP is broken) patch.

Ivan.

drivers/char/rtc.c +2 -0
@@ -870,7 +870,9 @@ no_irq:
 
 	if (misc_register(&rtc_dev))
 		{
+#if RTC_IRQ
 		free_irq(RTC_IRQ, NULL);
+#endif
 		release_region(RTC_PORT(0), RTC_IO_EXTENT);
 		return -ENODEV;
 		}
arch/alpha/lib/stxcpy.S +1 -1
@@ -20,7 +20,7 @@
  * Furthermore, v0, a3-a5, t11, and t12 are untouched.
  */
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 	.set noat
 	.set noreorder
arch/alpha/lib/ev6-stxcpy.S +1 -1
@@ -30,7 +30,7 @@
  * Try not to change the actual algorithm if possible for consistency.
  */
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 	.set noat
 	.set noreorder
arch/alpha/lib/ev6-stxncpy.S +1 -1
@@ -38,7 +38,7 @@
  * Try not to change the actual algorithm if possible for consistency.
  */
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 	.set noat
 	.set noreorder
arch/alpha/lib/strncpy_from_user.S +1 -1
@@ -12,7 +12,7 @@
 
 
 #include <asm/errno.h>
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 
 /* Allow an exception for an insn; exit if we get one.  */
arch/alpha/lib/stxncpy.S +1 -1
@@ -28,7 +28,7 @@
  * Furthermore, v0, a3-a5, t11, t12, and $at are untouched.
  */
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 	.set noat
 	.set noreorder
arch/alpha/lib/ev67-strlen_user.S +1 -1
@@ -23,7 +23,7 @@
  * Try not to change the actual algorithm if possible for consistency.
  */
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 
 /* Allow an exception for an insn; exit if we get one.  */
arch/alpha/lib/strchr.S +1 -1
@@ -6,7 +6,7 @@
  * string, or null if it is not found.
  */
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 	.set noreorder
 	.set noat
arch/alpha/lib/strlen_user.S +1 -1
@@ -12,7 +12,7 @@
  * boundary when doing so.
  */
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 
 /* Allow an exception for an insn; exit if we get one.  */
arch/alpha/lib/ev67-strrchr.S +1 -1
@@ -19,7 +19,7 @@
  */
 
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 	.set noreorder
 	.set noat
arch/alpha/lib/ev67-strchr.S +1 -1
@@ -16,7 +16,7 @@
  * Try not to change the actual algorithm if possible for consistency.
  */
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 	.set noreorder
 	.set noat
arch/alpha/lib/strrchr.S +1 -1
@@ -6,7 +6,7 @@
  * within a null-terminated string, or null if it is not found.
  */
 
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 	.set noreorder
 	.set noat
arch/alpha/lib/ev6-strncpy_from_user.S +1 -1
@@ -27,7 +27,7 @@
 
 
 #include <asm/errno.h>
-#include <alpha/regdef.h>
+#include <asm/regdef.h>
 
 
 /* Allow an exception for an insn; exit if we get one.  */
arch/alpha/kernel/pci.c +4 -4
@@ -190,12 +190,12 @@ pcibios_align_resource(void *data, struc
 #undef MB
 #undef GB
 
-static void __init
+static int __init
 pcibios_init(void)
 {
-	if (!alpha_mv.init_pci)
-		return;
-	alpha_mv.init_pci();
+	if (alpha_mv.init_pci)
+		alpha_mv.init_pci();
+	return 0;
 }
 
 subsys_initcall(pcibios_init);
arch/alpha/kernel/signal.c +1 -0
@@ -18,6 +18,7 @@
 #include <linux/smp_lock.h>
 #include <linux/stddef.h>
 #include <linux/tty.h>
+#include <linux/binfmts.h>
 
 #include <asm/bitops.h>
 #include <asm/uaccess.h>
arch/alpha/kernel/osf_sys.c +1 -0
@@ -33,6 +33,7 @@
 #include <linux/file.h>
 #include <linux/types.h>
 #include <linux/ipc.h>
+#include <linux/namei.h>
 
 #include <asm/fpu.h>
 #include <asm/io.h>
arch/alpha/kernel/alpha_ksyms.c +0 -1
@@ -214,7 +214,6 @@ EXPORT_SYMBOL(flush_tlb_page);
 EXPORT_SYMBOL(smp_imb);
 EXPORT_SYMBOL(cpu_data);
 EXPORT_SYMBOL(__cpu_number_map);
-EXPORT_SYMBOL(smp_num_cpus);
 EXPORT_SYMBOL(smp_call_function);
 EXPORT_SYMBOL(smp_call_function_on_cpu);
 EXPORT_SYMBOL(global_irq_holder);
arch/alpha/kernel/setup.c +1 -1
@@ -1109,7 +1109,7 @@ show_cpuinfo(struct seq_file *f, void *s
 #ifdef CONFIG_SMP
 	seq_printf(f, "cpus active\t\t: %d\n"
 		      "cpu active mask\t\t: %016lx\n",
-		       smp_num_cpus, cpu_present_mask);
+		       num_online_cpus(), cpu_present_mask);
 #endif
 
 	return 0;
include/asm-alpha/page.h +8 -4
@@ -15,10 +15,10 @@
 #define STRICT_MM_TYPECHECKS
 
 extern void clear_page(void *page);
-#define clear_user_page(page, vaddr)	clear_page(page)
+#define clear_user_page(page, vaddr, pg)	clear_page(page)
 
 extern void copy_page(void * _to, void * _from);
-#define copy_user_page(to, from, vaddr)	copy_page(to, from)
+#define copy_user_page(to, from, vaddr, pg)	copy_page(to, from)
 
 #ifdef STRICT_MM_TYPECHECKS
 /*
@@ -95,8 +95,12 @@ extern __inline__ int get_order(unsigned
 #define __pa(x)			((unsigned long) (x) - PAGE_OFFSET)
 #define __va(x)			((void *)((unsigned long) (x) + PAGE_OFFSET))
 #ifndef CONFIG_DISCONTIGMEM
-#define virt_to_page(kaddr)	(mem_map + (__pa(kaddr) >> PAGE_SHIFT))
-#define VALID_PAGE(page)	(((page) - mem_map) < max_mapnr)
+#define pfn_to_page(pfn)	(mem_map + (pfn))
+#define page_to_pfn(page)	((unsigned long)((page) - mem_map))
+#define virt_to_page(kaddr)	pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
+
+#define pfn_valid(pfn)		((pfn) < max_mapnr)
+#define virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 #endif /* CONFIG_DISCONTIGMEM */
 
 #define VM_DATA_DEFAULT_FLAGS		(VM_READ | VM_WRITE | VM_EXEC | \
include/asm-alpha/pgtable.h +20 -22

73 lines not on this page · raw message

include/asm-alpha/tlb.h +14 -0
@@ -1 +1,15 @@
+#ifndef _ALPHA_TLB_H
+#define _ALPHA_TLB_H
+
+#define tlb_start_vma(tlb, vma)			do { } while (0)
+#define tlb_end_vma(tlb, vma)			do { } while (0)
+#define tlb_remove_tlb_entry(tlb, pte, addr)	do { } while (0)
+
+#define tlb_flush(tlb)				flush_tlb_mm((tlb)->mm)
+
 #include <asm-generic/tlb.h>
+
+#define pte_free_tlb(tlb,pte)			pte_free(pte)
+#define pmd_free_tlb(tlb,pmd)			pmd_free(pmd)
+ 
+#endif
include/asm-alpha/bitops.h +14 -0
@@ -315,6 +315,20 @@ static inline int ffs(int word)
 	return word ? result+1 : 0;
 }
 
+/*
+ * fls: find last bit set.
+ */
+#if defined(__alpha_cix__) && defined(__alpha_fix__)
+static inline int fls(int word)
+{
+	long result;
+	__asm__("ctlz %1,%0" : "=r"(result) : "r"(word & 0xffffffff));
+	return 64 - result;
+}
+#else
+#define fls	generic_fls
+#endif
+
 /* Compute powers of two for the given integer.  */
 static inline int floor_log2(unsigned long word)
 {
include/asm-alpha/regdef.h +44 -0

44 lines not on this page · raw message

include/asm-alpha/hardirq.h +1 -1
@@ -56,7 +56,7 @@ static inline int irqs_running (void)
 {
 	int i;
 
-	for (i = 0; i < smp_num_cpus; i++)
+	for (i = 0; i < NR_CPUS; i++)
 		if (local_irq_count(i))
 			return 1;
 	return 0;
include/asm-alpha/mmu_context.h +3 -2
@@ -227,8 +227,9 @@ init_new_context(struct task_struct *tsk
 {
 	int i;
 
-	for (i = 0; i < smp_num_cpus; i++)
-		mm->context[cpu_logical_map(i)] = 0;
+	for (i = 0; i < NR_CPUS; i++)
+		if (cpu_online(i))
+			mm->context[i] = 0;
         tsk->thread_info->pcb.ptbr
 	  = ((unsigned long)mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
 	return 0;
include/asm-alpha/smp.h +0 -9
@@ -42,15 +42,6 @@ extern struct cpuinfo_alpha cpu_data[NR_
 
 #define PROC_CHANGE_PENALTY     20
 
-/* Map from cpu id to sequential logical cpu number.  This will only
-   not be idempotent when cpus failed to come on-line.  */
-extern int __cpu_number_map[NR_CPUS];
-#define cpu_number_map(cpu)  __cpu_number_map[cpu]
-
-/* The reverse map from sequential logical cpu number to cpu id.  */
-extern int __cpu_logical_map[NR_CPUS];
-#define cpu_logical_map(cpu)  __cpu_logical_map[cpu]
-
 #define hard_smp_processor_id()	__hard_smp_processor_id()
 #define smp_processor_id()	(current_thread_info()->cpu)
 
include/asm-alpha/system.h +6 -2
@@ -130,8 +130,12 @@ struct el_common_EV6_mcheck {
 extern void halt(void) __attribute__((noreturn));
 #define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
 
-#define prepare_to_switch()	do { } while(0)
-#define switch_to(prev,next)						  \
+#define prepare_arch_schedule(prev)		do { } while(0)
+#define finish_arch_schedule(prev)		do { } while(0)
+#define prepare_arch_switch(rq)			do { } while(0)
+#define finish_arch_switch(rq)			spin_unlock_irq(&(rq)->lock)
+
+#define switch_to(prev,next,last)						  \
 do {									  \
 	alpha_switch_to(virt_to_phys(&(next)->thread_info->pcb), (prev)); \
 	check_mmu_context();						  \
#6 lore raw

From: Ivan Kokshaysky <[email protected]>
Date: Fri, Jun 21, 2002 at 07:24:05PM +0400

Quoted 8 lines · Jurriaan on Alpha
Quoted 3 lines

I tried #define smp_num_cpus 1 in include/asm-alpha/smp.h (the non-smp section) but the same line in include/asm/mmu_context.h works - for a while.

I'm running 2.5.24 on sx164 with following (unfinished - SMP is broken) patch.

This patchs helps a lot; now I get:

make[1]: Entering directory `/usr/src/linux-2.5.24/init'
Generating /usr/src/linux-2.5.24/include/linux/compile.h (updated)
gcc -Wp,-MD,./.version.o.d -D__KERNEL__ -I/usr/src/linux-2.5.24/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-p
ointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -nostdinc -iwithprefix include -DKBUILD_
BASENAME=version -c -o version.o version.c
ld -r -o init.o main.o version.o do_mounts.o
make[1]: Leaving directory `/usr/src/linux-2.5.24/init'
ld -static -T arch/alpha/vmlinux.lds -N arch/alpha/kernel/head.o init/init.o --start-group arch/alpha/kernel/kernel.o arch/alpha/m
m/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o arch/alpha/math-emu/built-in.o /usr/src/linux-2.5.24/arch/alpha/lib/lib.a lib/lib.a /usr/src/linux-2.5.24/arch/alpha/lib/lib.a drivers/built-in.o sound/sound.o net/network.o --end-group -o vmlinux drivers/built-in.o(.data+0x37118): undefined reference to local symbols in discarded section .text.exit' net/network.o: In function ip_conntrack_helper_register':
net/network.o(.text+0x5e68c): undefined reference to `__this_module'
net/network.o: In function `ip_conntrack_helper_unregister':
net/network.o(.text+0x5e76c): undefined reference to `__this_module'
net/network.o: In function `ip_nat_helper_register':
net/network.o(.text+0x62894): undefined reference to `__this_module'
net/network.o: In function `ip_nat_helper_unregister':
net/network.o(.text+0x62b5c): undefined reference to `__this_module'
make: *** [vmlinux] Error 1
alpha:/usr/src/linux-2.5.24#

I'll probably have to fiddle with my .config to solve this.

Thanks,
Jurriaan

Signature · 4 lines
Our music has many faces and many moods like the land we live in.
It is a fusion of energy and serenity
        Kansas
Debian GNU/Linux 2.4.19p10 on Alpha 990 bogomips load:0.54 0.74 0.77
#7 lore raw

On Fri, 2002-06-21 22:37:26 +0200, Jurriaan on Alpha <[email protected]> wrote in message <[email protected]>:

Quoted 7 lines

From: Ivan Kokshaysky <[email protected]>
Date: Fri, Jun 21, 2002 at 07:24:05PM +0400

Quoted 5 lines · Jurriaan on Alpha
Quoted 3 lines

I tried #define smp_num_cpus 1 in include/asm-alpha/smp.h (the non-smp section) but the same line in include/asm/mmu_context.h works - for a while.

Quoted 5 lines
Quoted 3 lines

I'm running 2.5.24 on sx164 with following (unfinished - SMP is broken) patch.

This patchs helps a lot; now I get:
drivers/built-in.o(.data+0x37118): undefined reference to `local symbols in discarded section .text.exit'

I think this "bug" appears with some binutils some weeks/months old. Try to upgrade them.

I'm not hitting this bug, but for me, ./arch/alpha/kernel/head.o isn't build (actually, there aren't any .o files in that directory), even if I try to explicitely compile head.o by 'make arch/alpha/kernel/head.o'. Any hints there?

MfG, JBG

Signature · 3 lines
Jan-Benedict Glaw   .   [email protected]   .   +49-172-7608481
	 -- New APT-Proxy written in shell script --
	   http://lug-owl.de/~jbglaw/software/ap2/
#8 lore raw

From: Jan-Benedict Glaw <[email protected]>
Date: Fri, Jun 21, 2002 at 10:57:41PM +0200

Quoted 9 lines

On Fri, 2002-06-21 22:37:26 +0200, Jurriaan on Alpha <[email protected]> wrote in message <[email protected]>:

Quoted 3 lines

This patchs helps a lot; now I get:
drivers/built-in.o(.data+0x37118): undefined reference to `local symbols in discarded section .text.exit'

I think this "bug" appears with some binutils some weeks/months old. Try to upgrade them.

Hmm, I had an up-to-date debian testing system.
So I upgraded to the latest binutils from unstable, that didn't work. Then I downloaded binutils-2.12.1 from source and installed that - still doesn't work.
The latest from unstable was 2.12.90.0.9.

make[1]: Leaving directory `/usr/src/linux-2.5.24/init'
ld -static -T arch/alpha/vmlinux.lds -N arch/alpha/kernel/head.o init/init.o --start-group arch/alpha/kernel/kernel.o arch/alpha/m
m/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o arch/alpha/math-emu/built-in.o /usr/src/linux-2.5.24/arch/alpha/lib/lib.a lib/lib.a /usr/src/linux-2.5.24/arch/alpha/lib/lib.a drivers/built-in.o sound/sound.o net/network.o --end-group -o vmlinux drivers/built-in.o(.data+0x37118): undefined reference to `local symbols in discarded section .text.exit'
make: *** [vmlinux] Error 1

alpha:/usr/src/linux-2.5.24# ld -v
GNU ld version 2.12.90.0.9 20020526 Debian GNU/Linux
alpha:/usr/src/linux-2.5.24# ld -static -T arch/alpha/vmlinux.lds -N  arch/alpha/kernel/head.o init/init.o --start-group arch/alpha/k
ernel/kernel.o arch/alpha/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o arch/alpha/math-emu/built-in.o /usr/src/linux-2.5.24/arch
/alpha/lib/lib.a lib/lib.a /usr/src/linux-2.5.24/arch/alpha/lib/lib.a drivers/built-in.o sound/sound.o net/network.o --end-group -o v
mlinux
drivers/built-in.o(.data+0x37118): undefined reference to `local symbols in discarded section .text.exit'
alpha:/usr/src/linux-2.5.24# ld -v
GNU ld version 2.12.1
alpha:/usr/src/linux-2.5.24#
Quoted 5 lines

I'm not hitting this bug, but for me, ./arch/alpha/kernel/head.o isn't build (actually, there aren't any .o files in that directory), even if I try to explicitely compile head.o by 'make arch/alpha/kernel/head.o'. Any hints there?

None, but could you please tell me what version of binutils you're using?

Thanks,
Jurriaan

Signature · 4 lines
"A cat's got her own opinion of human beings. She don't say much, but you
 can tell enough to make you anxious not to hear the whole of it."
	Jerome K. Jerome (1859 - 1927) 
Debian GNU/Linux 2.4.19p10 on Alpha 990 bogomips 5 users load:2.45 2.33 1.71
#9 lore raw

Juriaan on Alpha wrote:
[ ... ]

Quoted 2 lines

None, but could you please tell me what version of binutils you're using?

I'm working with binutils-2.12.90.0.7-3 from Rawhide, because my base-system is RedHat. And this version worked well. I'm also using gcc-3.1-6 and glibc-2.2.4-24.

I hope this helps...

-Oliver

#10 lore raw
In reply to Ivan Kokshaysky
Quoted 9 lines · Ivan Kokshaysky
Quoted 1 line · Jurriaan on Alpha

I tried #define smp_num_cpus 1 in include/asm-alpha/smp.h

(the non-smp

Quoted 1 line

section) but the same line in include/asm/mmu_context.h

works - for a

Quoted 1 line

while.

I'm running 2.5.24 on sx164 with following (unfinished - SMP is broken) patch.

The patch worked well and did what my patch did not yet. :o) I compiles without problems. I'll try to boot the machine tommorow (at work).

I'll send you the results. :o)

Greetz,
Oliver

#11 lore raw

Boot problems (WAS: RE: 2.5.24 doesn't compile on Alpha)

Hi Ivan!

Quoted 8 lines · Oliver Pitzeier
Quoted 7 lines · Ivan Kokshaysky
Quoted 1 line · Jurriaan on Alpha

I tried #define smp_num_cpus 1 in include/asm-alpha/smp.h

(the non-smp

Quoted 1 line

section) but the same line in include/asm/mmu_context.h

works - for a

Quoted 1 line

while.

Quoted 8 lines
Quoted 2 lines

I'm running 2.5.24 on sx164 with following (unfinished - SMP is broken) patch.

The patch worked well and did what my patch did not yet. :o) I compiles without problems. I'll try to boot the machine tommorow (at work).

I'll send you the results. :o)

I cannot boot the kernel... Here's the problem... But what does this mean? "swapper"? Has this something to do with swap?

EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly. Freeing unused kernel memory: 304k freed Kernel bug at ll_rw_blk.c:1639
swapper(1): Kernel Bug 1
pc = [<fffffc00003f7bb8>] ra = [<fffffc00003f7cdc>] ps = 0000 Not
tainted

v0 = 0000000000000000  t0 = 0000000000000001  t1 = 0000000000000040
t2 = fffffc000fdcbae0  t3 = fffffc00005514e8  t4 = 0000000000000001
t5 = fffffc000e6e0120  t6 = fffffc000e6e00c0  t7 = fffffc00007e8000
a0 = fffffc000fec3da0  a1 = fffffc000fec3da0  a2 = fffffc00007eb498
a3 = fffffc00007eb4a8  a4 = fffffc00007eb490  a5 = fffffc00005260b0
t8 = 0000000000000000  t9 = 0000000000000000  t10= 0000000000007370
t11= 8e38e38e38e38e39  pv = fffffc00003f7c80  at = fffffc00007a1798
gp = fffffc000054b6c8  sp = fffffc00007eb530

Trace:fffffc00003f7cdc fffffc00003794a4 fffffc00003797f4 fffffc0000379af8 fffffc000031fbb0 fffffc00003c4040 fffffc00003c4074 fffffc000033c694 fffffc000033c878 fffffc000038d490 fffffc000038e8ec fffffc000038d490 fffffc000035073c fffffc0000350824 fffffc000033d3cc fffffc000033dad8 fffffc000033d970 fffffc000035f3c4 fffffc0000360178 fffffc000031085c fffffc0000310214 fffffc00003107d8 fffffc0000310cc8 fffffc000032466c fffffc000031008c fffffc00003100b0 fffffc00003107c0

Code: 00000081  00000616  0050e86a  fffffc00  c3ffffe7  00000081
<00000667> 0050e86a 
Kernel panic: Attempted to kill init!

Greetz,
Oliver