Skip to contentSkip to conversation

new kernel diff (relative to 2.3.99-pre5)

Linux-ia64 David Mosberger 8 participants 13 messages Apr 25, 2000 – May 2, 2000

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

A new IA-64 kernel diff is now available at:

ftp://ftp.kernel.org/linux/kernel/ports/ia64/

in files linux-2.3.99-pre5-ia64-000424.diff*. This diff is relative to 2.3.99-pre5 and should work reasonably well on SMP (much better than the previous patch, for sure...). The changes since the previous patch are below. In summary:

- Don't prevent concurrent execution of IPI and timer interrupts. This gets rid of the extremely frequent "ITM in past" messages we were seeing. Thanks to Asit for pointing this out. Apparently, this bug was fixed a while ago already and got re-introduced when we switched to the new irq code (based on the x86 code). My bad.

- Put the itm[cpu].next value in a separate cachline for each CPU. This ain't pretty and I think we'll want a separate global variable (perhaps cpu[NUM_CPUS]) instead so we can collect (small) variables that need to be per-CPU so that we don't waste most of a cache-line for each such variable. But for now, this will do.

- Disable the gettimeoffset() code for SMP. That code doesn't work _unless_ the ITC on all CPUs are in perfect synchrony. The effect of this is that gettimeofday() will return values with timer-tick (currently 10ms) resolution only. If someone has a smart idea on how to do this properly on an SMP without assuming the presence of an external timer chip and without causing extra IPIs, I'm all ears. ;-)

- Various minor updates to sync up with 2.3.99-pre5. A noteworthy change that the glibc folks should pay attention to: there are two new system calls: madvise() and mincore(). We should add glibc stubs for these (perhaps they're in glibc-2.2 already?).

- Some minor spinlock fixes.

Enjoy,

	--david
arch/ia64/kernel/irq.c +2 -1
diff -urN linux-davidm/arch/ia64/kernel/irq.c linux-2.3.99-pre5-lia/arch/ia64/kernel/irq.c
@@ -582,7 +582,8 @@
 	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
 		action = desc->action;
 		status &= ~IRQ_PENDING; /* we commit to handling */
-		status |= IRQ_INPROGRESS; /* we are handling it */
+		if (!(status & IRQ_PER_CPU))
+			status |= IRQ_INPROGRESS; /* we are handling it */
 	}
 	desc->status = status;
 
arch/ia64/kernel/irq_ia64.c +1 -1
diff -urN linux-davidm/arch/ia64/kernel/irq_ia64.c linux-2.3.99-pre5-lia/arch/ia64/kernel/irq_ia64.c
@@ -210,12 +210,12 @@
 	ia64_set_lrr0(0, 1);	
 	ia64_set_lrr1(0, 1);	
 
-	irq_desc[TIMER_IRQ].handler	    = &irq_type_ia64_sapic;
 	irq_desc[IA64_SPURIOUS_INT].handler = &irq_type_ia64_sapic;
 #ifdef CONFIG_SMP
 	/* 
 	 * Configure the IPI vector and handler
 	 */
+	irq_desc[IPI_IRQ].status |= IRQ_PER_CPU;
 	irq_desc[IPI_IRQ].handler = &irq_type_ia64_sapic;
 	setup_irq(IPI_IRQ, &ipi_irqaction);
 #endif
arch/ia64/kernel/ivt.S +1 -4
diff -urN linux-davidm/arch/ia64/kernel/ivt.S linux-2.3.99-pre5-lia/arch/ia64/kernel/ivt.S
@@ -441,9 +441,6 @@
 	tbit.z p6,p0=r17,IA64_PSR_IS_BIT	// IA64 instruction set?
 	;;
 (p6)	mov r16=r18				// if so, use cr.iip instead of cr.ifa
-#if 0
-	;;
-#endif
 	mov pr=r31,-1
 #endif /* CONFIG_ITANIUM */
 	movl r30				// load continuation point in case of nested fault
@@ -581,7 +578,7 @@
 	SAVE_REST
 	;;
 	alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group
-#ifdef	CONFIG_ITANIUM_ASTEP_SPECIFIC
+#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
 	mov out0=r0		// defer reading of cr.ivr to handle_irq...
 #else
 	mov out0=cr.ivr		// pass cr.ivr as first arg
arch/ia64/kernel/process.c +11 -4
diff -urN linux-davidm/arch/ia64/kernel/process.c linux-2.3.99-pre5-lia/arch/ia64/kernel/process.c
@@ -98,11 +98,18 @@
 		if (pm_idle)
 			(*pm_idle)();
 #ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
-		if (ia64_get_itm() < ia64_get_itc()) {
-			extern void ia64_reset_itm (void);
+		{
+			u64 itc, itm;
 
-			printk("cpu_idle: ITM in past, resetting it...\n");
-			ia64_reset_itm();
+			itc = ia64_get_itc();
+			itm = ia64_get_itm();
+			if (time_after(itc, itm)) {
+				extern void ia64_reset_itm (void);
+
+				printk("cpu_idle: ITM in past, resetting it (itc=%lx,itm=%lx:%lums)...\n",
+				       itc, itm, (itc - itm)/500000);
+				ia64_reset_itm();
+			}
 		}
 #endif
 	}
arch/ia64/kernel/time.c +30 -12

111 lines not on this page · raw message

drivers/ide/piix.c +3 -0
diff -urN linux-davidm/drivers/ide/piix.c linux-2.3.99-pre5-lia/drivers/ide/piix.c
@@ -396,8 +396,11 @@
 
 void __init ide_init_piix (ide_hwif_t *hwif)
 {
+#if 0
+	/* autoprobe instead... --davidm 00/04/20 */
 	if (!hwif->irq)
 		hwif->irq = hwif->channel ? 15 : 14;
+#endif
 
 	hwif->tuneproc = &piix_tune_drive;
 	hwif->drives[0].autotune = 1;
fs/binfmt_elf.c +8 -9
diff -urN linux-davidm/fs/binfmt_elf.c linux-2.3.99-pre5-lia/fs/binfmt_elf.c
@@ -282,8 +282,8 @@
 	    set_brk(ia32_mm_addr(vaddr + load_addr), vaddr + load_addr + eppnt->p_memsz);
 	    memset((char *) vaddr + load_addr + eppnt->p_filesz, 0,
 		   eppnt->p_memsz - eppnt->p_filesz);
-	    read_exec(interpreter->f_dentry, eppnt->p_offset,
-		      (char *)(vaddr + load_addr), eppnt->p_filesz, 0);
+	    kernel_read(interpreter, eppnt->p_offset, (char *)(vaddr + load_addr),
+			eppnt->p_filesz);
 	    map_addr = vaddr + load_addr;
 #else /* !CONFIG_BINFMT_ELF32 */
 	    map_addr = do_mmap(interpreter,
@@ -299,9 +299,8 @@
 			   (unsigned long) eppnt->p_memsz, (unsigned long) eppnt->p_filesz);
 		    map_addr = vaddr + load_addr;
 		    do_brk(map_addr & PAGE_MASK, eppnt->p_filesz);
-		    if (read_exec(file->f_dentry, eppnt->p_offset, (char *) map_addr,
-				  eppnt->p_filesz, 0)
-			< 0)
+		    if (kernel_read(interpreter, eppnt->p_offset, (char *) map_addr,
+				    eppnt->p_filesz) < 0)
 			    goto out_close;
 	    }
 
@@ -650,8 +649,8 @@
 		set_brk(ia32_mm_addr(vaddr + load_bias), vaddr + load_bias + elf_ppnt->p_memsz);
 		memset((char *) vaddr + load_bias + elf_ppnt->p_filesz, 0,
 		       elf_ppnt->p_memsz - elf_ppnt->p_filesz);
-		read_exec(bprm->dentry, elf_ppnt->p_offset,
-			  (char *)(vaddr + load_bias), elf_ppnt->p_filesz, 0);
+		kernel_read(bprm->file, elf_ppnt->p_offset, (char *) (vaddr + load_bias),
+			    elf_ppnt->p_filesz);
 		error = vaddr + load_bias;
 #else /* CONFIG_BINFMT_ELF32 */
 		error = do_mmap(bprm->file, ELF_PAGESTART(load_bias + vaddr),
@@ -667,8 +666,8 @@
 			       (unsigned long)elf_ppnt->p_filesz);
 			error = vaddr + load_bias;
 			do_brk(error & PAGE_MASK, elf_ppnt->p_filesz);
-			error = read_exec(bprm->dentry, elf_ppnt->p_offset, (char *) error,
-					  elf_ppnt->p_filesz, 0);
+			error = kernel_read(bprm->file, elf_ppnt->p_offset, (char *) error,
+					    elf_ppnt->p_filesz);
 		}
 
 		if (!load_addr_set) {
include/asm-ia64/spinlock.h +43 -47

123 lines not on this page · raw message

include/linux/irq.h +1 -0
diff -urN linux-davidm/include/linux/irq.h linux-2.3.99-pre5-lia/include/linux/irq.h
@@ -18,6 +18,7 @@
 #define IRQ_WAITING	32	/* IRQ not yet seen - for autodetection */
 #define IRQ_LEVEL	64	/* IRQ level triggered */
 #define IRQ_MASKED	128	/* IRQ masked - shouldn't be seen again */
+#define IRQ_PER_CPU	256	/* IRQ is per CPU */
 
 /*
  * Interrupt controller descriptor. This is all we need
kernel/module.c +1 -6
diff -urN linux-davidm/kernel/module.c linux-2.3.99-pre5-lia/kernel/module.c
@@ -800,6 +800,7 @@
 {
 	struct module_ref *dep;
 	unsigned i;
+
 	/* Let the module clean up.  */
 
 	if (mod->flags & MOD_RUNNING) 
@@ -1000,12 +1001,6 @@
 #else		/* CONFIG_MODULES */
 
 /* Dummy syscalls for people who don't want modules */
-
-int
-try_inc_mod_count (struct module *mod)
-{
-	return 1;
-}
 
 asmlinkage unsigned long
 sys_create_module(const char *name_user, size_t size)
kernel/printk.c +6 -4
diff -urN linux-davidm/kernel/printk.c linux-2.3.99-pre5-lia/kernel/printk.c
@@ -14,6 +14,8 @@
  *     [email protected]
  */
 
+#include <linux/config.h>
+
 #include <linux/mm.h>
 #include <linux/tty_driver.h>
 #include <linux/smp_lock.h>
@@ -504,7 +506,7 @@
 
 #define VGABASE		((char *)0x00000000000b8000)
 
-static int current_ypos = 0, current_xpos = 0;
+static int current_ypos = 50, current_xpos = 0;
 
 void
 early_printk (const char *str)
@@ -515,13 +517,13 @@
 	while ((c = *str++) != '\0') {
 		if (current_ypos >= 50) {
 			/* scroll 1 line up */
-			for(k = 1, j = 0; k < 50; k++, j++) {
-				for(i = 0; i < 80; i++) {
+			for (k = 1, j = 0; k < 50; k++, j++) {
+				for (i = 0; i < 80; i++) {
 					writew(readw(VGABASE + 2*(80*k + i)),
 					       VGABASE + 2*(80*j + i));
 				}
 			}
-			for(i = 0; i < 80; i++) {
+			for (i = 0; i < 80; i++) {
 				writew(0x720, VGABASE + 2*(80*j + i));
 			}
 			current_ypos = 49;
#1 lore raw

Hi David,

I get:

Linux version 2.3.99-pre5 (root@ls3020) (gcc version 2.9-ia64-000216 snap-000324) #1 Tue Apr 25 10:01:39 CEST 2000 EFI v0.92 by INTEL AL460GX.86B.0027.D27.021800: SALsystab=0x3ff29d60 ACPI=0x3ffd8f48 MPS=0x3ffd0000 SAL v2.112: ia32bios«sent, oem=, product=SAL
sal[0] - entry: pal_proc=0x3ff48010, sal_proc=0x3fef2080
SAL: Platform features BusLock
args to kernel: memQ2M root=/dev/sda2 console=ttyS0,9600n8
ACPI: INTEL LIONEMU 0.0

      CPU 0 (0000:0000): Available.

IOSAPIC Version 2.1: address 0xfec00000 IRQs 0x0 - 0x3f
1 CPUs available, 1 CPUs total
ia64_mca_init : begin
ia64_mca_init : registered mca rendezvous spinloop and wakeup mech. ia64_mca_init : correctable mca vector setup done
ia64_mca_init : registered os mca handler with SAL
ia64_mca_init : os init handler at 53b380
ia64_mca_init : registered os init handler with SAL
ia64_mca_init : platform-specific mca handling setup done
Mca related initialization done
On node 0 totalpages: 65378
zone(0): 65378 pages.
zone(1): 0 pages.
zone(2): 0 pages.
fpswa interface at 3fca4110
SAL/PAL returned: base-freq™800600, itc-ratio/2, proc-ratio/2
timer: base freq0.000MHz, ITC ratio/2, ITC freqP0.000MHz
Console: colour VGA+ 80x50
Unexpected irq vector 0x0 on CPU 0!
Lost clock tick on CPU 0 (nowžb60ab02, nextœ3d877c3)!!
Calibrating delay loop... 499.71 BogoMIPS
Memory: 1030512k/1046048k available (3148k code, 14592k reserved, 961k data, 256k init) init.c:79: bad pgd 400000000003de00.

Kernel panic: Out of memory.

In idle task - not syncing

with 2.3.99-pre5 + your patch on my Lion. 2.3.52-0419 was fine.

Greetings
Christoph

#2 lore raw
In reply to David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Christoph" = Christoph Rohland <[email protected]> writes:

Christoph> Hi David, I get:

[snip]

Christoph> with 2.3.99-pre5 + your patch on my Lion. 2.3.52-0419 was Christoph> fine.

Did you by any chance use cp to copy it to a fat partition? There are known issues with cp, whereas 'cat vmlinux > /<dos-partition>/vmlinux' works fine.

I just booted it here and it worked fine.

Jes

#3 lore raw
In reply to David Mosberger
Quoted 6 lines · Jes Sorensen

Christoph> with 2.3.99-pre5 + your patch on my Lion. 2.3.52-0419 was Christoph> fine.

Did you by any chance use cp to copy it to a fat partition? There are known issues with cp, whereas 'cat vmlinux > /<dos-partition>/vmlinux' works fine.

Thanks, that did work...

Greetings
Christoph

#4 lore raw
In reply to David Mosberger

I applied this patch to a stock 2.3.99pre5 kernel and compiled it with the 3/23 toolchain snapshot + patches and SMP turned on. The compile went ok under a 2.3.51 up kernel, but when I try to boot I get the message below and it hangs. I thought I remembered someone else having this problem, but I couldn't find it in my mail archives. Is there a simple solution? I'm running a 2p Lion box with A3 processors & 2 GB of RAM.

Thanks,
Jesse

fs0:\> eli vmlinux-2.3.99pre5smp root=/dev/sda2
Booting `vmlinux-2.3.99pre5smp' acpi_get_vectors
origin = 000000007FCDEE88
bus = 0
num_vector = B
bus = 1
num_vector = 9
bus = 2
num_vector = C
bus = 3
num_vector = C
bus = 4
num_vector = 8
bus = 5
num_vector = 8
bus = 6
num_vector = 8
unable to find _SB_.PCI7
Terminating boot services

#5 lore raw
In reply to David Mosberger
Quoted 19 lines · Jesse Barnes

I applied this patch to a stock 2.3.99pre5 kernel and compiled it with the 3/23 toolchain snapshot + patches and SMP turned on. The compile went ok under a 2.3.51 up kernel, but when I try to boot I get the message below and it hangs. I thought I remembered someone else having this problem, but I couldn't find it in my mail archives. Is there a simple solution? I'm running a 2p Lion box with A3 processors & 2 GB of RAM.

fs0:\> eli vmlinux-2.3.99pre5smp root=/dev/sda2
Booting `vmlinux-2.3.99pre5smp' acpi_get_vectors
origin = 000000007FCDEE88
bus = 0
num_vector = B
bus = 1
num_vector = 9
bus = 2
num_vector = C
bus = 3
num_vector = C

Quoted 8 lines

bus = 4
num_vector = 8
bus = 5
num_vector = 8
bus = 6
num_vector = 8
unable to find _SB_.PCI7
Terminating boot services

This usually means that the kernel failed booting somehow.

There was a problem with one firmware version which didn't setup the ACPI tables correctly which caused a problem.

You may want to try turning on early printk support. Don't forget to set the video mode to 80x50 before running eli.

Then you'll see where it failed.

JE

#6 lore raw
In reply to David Mosberger

The kernel binary that you are trying to boot is seeming like corrupted. esrly_printk will not help as eli does not even seem to have passed the control to kernel.

Quoted 62 lines

-----Original Message-----
From: Johannes Erdfelt [mailto:[email protected]]
Sent: Tuesday, April 25, 2000 7:19 PM
To: [email protected]
Subject: Re: [Linux-ia64] new kernel diff (relative to 2.3.99-pre5)

Quoted 1 line · Jesse Barnes

I applied this patch to a stock 2.3.99pre5 kernel and

compiled it with

Quoted 1 line

the 3/23 toolchain snapshot + patches and SMP turned on.

The compile

Quoted 2 lines

went ok under a 2.3.51 up kernel, but when I try to boot I get the message below and it hangs. I thought I remembered someone

else having

Quoted 1 line

this problem, but I couldn't find it in my mail archives.

Is there a

Quoted 1 line

simple solution? I'm running a 2p Lion box with A3

processors & 2 GB of

Quoted 13 lines

RAM.

fs0:\> eli vmlinux-2.3.99pre5smp root=/dev/sda2
Booting `vmlinux-2.3.99pre5smp' acpi_get_vectors
origin = 000000007FCDEE88
bus = 0
num_vector = B
bus = 1
num_vector = 9
bus = 2
num_vector = C
bus = 3
num_vector = C

Quoted 8 lines

bus = 4
num_vector = 8
bus = 5
num_vector = 8
bus = 6
num_vector = 8
unable to find _SB_.PCI7
Terminating boot services

This usually means that the kernel failed booting somehow.

There was a problem with one firmware version which didn't setup the ACPI
tables correctly which caused a problem.

You may want to try turning on early printk support. Don't forget to set
the video mode to 80x50 before running eli.

Then you'll see where it failed.

JE

_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64

#7 lore raw
In reply to David Mosberger

Yup, seems to have been a corrupted kernel. I compiled the same kernel with the same .config on an IA32 box with the SGI compilers. That kernel seems to work. I think the toolchain I was compiling with might be funky.

Thanks,
Jesse

Quoted 5 lines · Rohit

The kernel binary that you are trying to boot is seeming like corrupted. esrly_printk will not help as eli does not even seem to have passed the control to kernel.

#8 lore raw
In reply to David Mosberger

Mike,

I don't release patches quite as frequently as Linus, so the intermediate versions you're looking for simply do not exist.

	--david
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Mike Weiss

Mike> Why are there only bits and peices of the kernel progression Mike> on the kernel.org site? Where can I find the other peices, Mike> from 2.3.47->2.3.50, 2.3.51-> 2.3.99-pre5?

#9 lore raw

[Linux-ia64] new kernel diff (relative to v2.3.99-pre6)

In reply to David Mosberger

Here is the latest kernel diff. Summary of changes:

- Make kernel work on SoftSDV again (Don).

- Don's IA-32 debug-code removal fixes.

- Make kernel work with HP simulator again (simserial updates).

- Make IVR workarounds A1-stepping specific. However, CONFIG_ITANIUM_A1_SPECIFIC MUST be defined for now, even if you're running on A2 or later. I couldn't yet get the kernel to work without the A1 workarounds, so you can't turn these workarounds off just yet.

- Small fix to make strace work better. Problem was due to the fact that the kernel didn't notify the parent upon returning from sigreturn.

- Fix a suble error that caused time-warps on UP when the system was under heavy load. With these fixes in place, UP systems pass the test program I'm using to verify that gettimeofday() returns non-decreasing values even under heavy load.

- Fix a small bug in SET_UNALIGN_CTL() which had the effect of making it possible to only turn unalign control bits on (no way to turn them off ;-).

- Reinstantiate ipc_parse_version() fixes to ensure that on IA-64 we always use the IPC_64 version of the IPC syscalls.

As usual, the diff attached below is for informational purposes only. The full diff is at ftp.kernel.org:/pub/linux/kernel/ports/ia64/ in:

	linux-2.3.99-pre6-ia64-000501.diff.bz2

This kernel has been tested with UP hardware and the HP simulator. I expect it to work on SMP as well. Caveat: I don't think the NFS server works in this kernel, at least not if V3 support is enabled. It could be a nfs-utils problem, but I haven't tried to track it down (the NFS client works fine though).

Enjoy,

	--david
arch/ia64/config.in +1 -0
diff -urN linux-davidm/arch/ia64/config.in linux-2.3.99-pre6-lia/arch/ia64/config.in
@@ -23,6 +23,7 @@
 
 if [ "$CONFIG_IA64_DIG" = "y" ]; then
 	bool '  Enable Itanium A-step specific code' CONFIG_ITANIUM_ASTEP_SPECIFIC
+	bool '  Enable Itanium A1-step specific code' CONFIG_ITANIUM_A1_SPECIFIC
 	bool '  Enable SoftSDV hacks' CONFIG_IA64_SOFTSDV_HACKS
 	bool '  Enable BigSur hacks' CONFIG_IA64_BIGSUR_HACKS
 	bool '  Enable Lion hacks' CONFIG_IA64_LION_HACKS
arch/ia64/dig/iosapic.c +2 -0
diff -urN linux-davidm/arch/ia64/dig/iosapic.c linux-2.3.99-pre6-lia/arch/ia64/dig/iosapic.c
@@ -240,6 +240,7 @@
 #endif
 	}
 
+#ifndef CONFIG_IA64_SOFTSDV_HACKS
 	/* 
 	 * Map the PCI Interrupt data into the ACPI IOSAPIC data using
 	 * the info that the bootstrap loader passed to us.
@@ -270,6 +271,7 @@
 		       irq, iosapic_pin(irq));
 #endif
 	}
+#endif /* CONFIG_IA64_SOFTSDV_HACKS */
 
 	for (i = 0; i < NR_IRQS; ++i) {
 		if (iosapic_pin(i) != -1) {
arch/ia64/dig/setup.c +4 -0
diff -urN linux-davidm/arch/ia64/dig/setup.c linux-2.3.99-pre6-lia/arch/ia64/dig/setup.c
@@ -53,6 +53,10 @@
 	 */
 	ROOT_DEV = to_kdev_t(0x0802);		/* default to second partition on first drive */
 
+#ifdef	CONFIG_IA64_SOFTSDV_HACKS
+	ROOT_DEV = to_kdev_t(0x0302);		/* 2nd partion on 1st IDE */
+#endif /* CONFIG_IA64_SOFTSDV_HACKS */
+
 #ifdef CONFIG_SMP
 	init_smp_config();
 #endif
arch/ia64/ia32/sys_ia32.c +1 -13
diff -urN linux-davidm/arch/ia64/ia32/sys_ia32.c linux-2.3.99-pre6-lia/arch/ia64/ia32/sys_ia32.c
@@ -214,29 +214,21 @@
 		return -EINVAL;
 	if (prot & PROT_WRITE)
 		prot |= PROT_EXEC;
-#ifdef	DDD
-#else	// DDD
 	prot |= PROT_WRITE;
-#endif	// DDD
 	front = NULL;
 	back = NULL;
 	if ((baddr = (addr & PAGE_MASK)) != addr && get_user(c, (char *)baddr) = 0) {
 		front = kmalloc(addr - baddr, GFP_KERNEL);
 		memcpy(front, (void *)baddr, addr - baddr);
 	}
-#ifndef	DDD
-	if (addr)
-#endif
-	if (((addr + len) & ~PAGE_MASK) && get_user(c, (char *)(addr + len)) = 0) {
+	if (addr && ((addr + len) & ~PAGE_MASK) && get_user(c, (char *)(addr + len)) = 0) {
 		back = kmalloc(PAGE_SIZE - ((addr + len) & ~PAGE_MASK), GFP_KERNEL);
 		memcpy(back, addr + len, PAGE_SIZE - ((addr + len) & ~PAGE_MASK));
 	}
 	if ((r = do_mmap(0, baddr, len + (addr - baddr), prot, flags | MAP_ANONYMOUS, 0)) < 0)
 		return(r);
-#ifndef	DDD
 	if (addr = 0)
 		addr = r;
-#endif	// DDD
 	if (back) {
 		memcpy(addr + len, back, PAGE_SIZE - ((addr + len) & ~PAGE_MASK));
 		kfree(back);
@@ -300,11 +292,7 @@
 	}
 	a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
 
-#ifdef	DDD
 	if ((a.flags & MAP_FIXED) && ((a.addr & ~PAGE_MASK) || (a.offset & ~PAGE_MASK))) {
-#else	// DDD
-	if (1) {
-#endif	// DDD
 		unlock_kernel();
 		up(&current->mm->mmap_sem);
 		error = do_mmap_fake(file, a.addr, a.len, a.prot, a.flags, a.offset);
arch/ia64/kernel/entry.S +3 -2
diff -urN linux-davidm/arch/ia64/kernel/entry.S linux-2.3.99-pre6-lia/arch/ia64/kernel/entry.S
@@ -772,7 +772,9 @@
 	mov rp=loc1
 	br.ret.sptk.many rp
 	.endp invoke_schedule_tail
+#endif /* CONFIG_SMP */
 
+#if defined(CONFIG_SMP) || defined(CONFIG_IA64_SOFTSDV_HACKS)
 	.proc invoke_ia64_reset_itm
 invoke_ia64_reset_itm:
 	alloc loc0=ar.pfs,8,2,0,0
@@ -784,8 +786,7 @@
 	mov rp=loc1
 	br.ret.sptk.many rp
 	.endp invoke_ia64_reset_itm
-
-#endif /* CONFIG_SMP */
+#endif /* defined(CONFIG_SMP) || defined(CONFIG_IA64_SOFTSDV_HACKS) */
 
 	/*
 	 * Invoke do_softirq() while preserving in0-in7, which may be needed
arch/ia64/kernel/irq_ia64.c +38 -49

181 lines not on this page · raw message

arch/ia64/kernel/ivt.S +1 -2
diff -urN linux-davidm/arch/ia64/kernel/ivt.S linux-2.3.99-pre6-lia/arch/ia64/kernel/ivt.S
@@ -578,7 +578,7 @@
 	SAVE_REST
 	;;
 	alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group
-#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
+#ifdef CONFIG_ITANIUM_A1_SPECIFIC
 	mov out0=r0		// defer reading of cr.ivr to handle_irq...
 #else
 	mov out0=cr.ivr		// pass cr.ivr as first arg
@@ -936,7 +936,6 @@
 	mov r31=pr		// prepare to save predicates
 	;;									
 	srlz.d			// ensure everyone knows psr.dt is off
-	mov r190		// error vector for fault_handler (when kernel)
 	br.cond.sptk.many dispatch_unaligned_handler
 
 	.align 256
arch/ia64/kernel/mca.c +0 -1
diff -urN linux-davidm/arch/ia64/kernel/mca.c linux-2.3.99-pre6-lia/arch/ia64/kernel/mca.c
@@ -17,7 +17,6 @@
 #include <linux/sched.h>
 #include <linux/irq.h>
 #include <linux/smp_lock.h>
-#include <linux/config.h>
 
 #include <asm/page.h>
 #include <asm/ptrace.h>
arch/ia64/kernel/signal.c +9 -3
diff -urN linux-davidm/arch/ia64/kernel/signal.c linux-2.3.99-pre6-lia/arch/ia64/kernel/signal.c
@@ -163,9 +163,15 @@
 	 * must not touch r8 or r10 as otherwise user-level stat could
 	 * be corrupted.
 	 */
-	retval = (long) &ia64_leave_kernel | 1;
-	if ((current->flags & PF_TRACESYS)
-	    && (sc->sc_flags & IA64_SC_FLAG_IN_SYSCALL))
+	retval = (long) &ia64_leave_kernel;
+	if (current->flags & PF_TRACESYS)
+		/*
+		 * strace expects to be notified after sigreturn
+		 * returns even though the context to which we return
+		 * may not be in the middle of a syscall.  Thus, the
+		 * return-value that strace displays for sigreturn is
+		 * meaningless.
+		 */
 		retval = (long) &ia64_strace_leave_kernel;
 
 	if (!access_ok(VERIFY_READ, sc, sizeof(*sc)))
arch/ia64/kernel/smp.c +1 -1
diff -urN linux-davidm/arch/ia64/kernel/smp.c linux-2.3.99-pre6-lia/arch/ia64/kernel/smp.c
@@ -68,7 +68,7 @@
 };
 static struct smp_call_struct *smp_call_function_data;
 
-#ifdef	CONFIG_ITANIUM_ASTEP_SPECIFIC
+#ifdef	CONFIG_ITANIUM_A1_SPECIFIC
 extern spinlock_t ivr_read_lock;
 #endif
 
arch/ia64/kernel/time.c +28 -21

90 lines not on this page · raw message

arch/ia64/kernel/traps.c +0 -5
diff -urN linux-davidm/arch/ia64/kernel/traps.c linux-2.3.99-pre6-lia/arch/ia64/kernel/traps.c
@@ -450,11 +450,6 @@
 		force_sig_info(SIGTRAP, &siginfo, current);
 		return;
 
-	      case 30: /* Unaligned fault */
-		sprintf(buf, "Kernel unaligned trap accessing %016lx (ip=%016lx)!",
-			ifa, regs->cr_iip + ia64_psr(regs)->ri);
-		break;
-
 	      case 32: /* fp fault */
 	      case 33: /* fp trap */
 		result = handle_fpu_swa((vector = 32) ? 1 : 0, regs, isr);
drivers/char/Config.in +5 -0
diff -urN linux-davidm/drivers/char/Config.in linux-2.3.99-pre6-lia/drivers/char/Config.in
@@ -16,6 +16,11 @@
       tristate '   Dual serial port support' CONFIG_DUALSP_SERIAL
    fi
 fi
+
+if [ "$CONFIG_SERIAL" = "n" ]; then
+	bool 'Simulated serial driver support' CONFIG_SIM_SERIAL
+fi
+
 bool 'Extended dumb serial driver options' CONFIG_SERIAL_EXTENDED
 if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
    bool '  Support more than 4 serial ports' CONFIG_SERIAL_MANY_PORTS
drivers/char/Makefile +1 -0
diff -urN linux-davidm/drivers/char/Makefile linux-2.3.99-pre6-lia/drivers/char/Makefile
@@ -111,6 +111,7 @@
   endif
 endif
 
+obj-$(CONFIG_SIM_SERIAL) += simserial.o
 obj-$(CONFIG_ROCKETPORT) += rocket.o
 obj-$(CONFIG_MOXA_SMARTIO) += mxser.o
 obj-$(CONFIG_MOXA_INTELLIO) += moxa.o
drivers/ide/ide-cd.c +2 -0
diff -urN linux-davidm/drivers/ide/ide-cd.c linux-2.3.99-pre6-lia/drivers/ide/ide-cd.c
@@ -2075,6 +2075,7 @@
 
 	init_cdrom_command(&cgc, &buf, sizeof(buf), CGC_DATA_UNKNOWN);
 
+#ifndef CONFIG_IA64_SOFTSDV_HACKS      /* MODE_SENSE unsupported by simulator */
 #ifndef __ACER50__
 	/* Now with that done, update the speed fields */
         do {    /* we seem to get stat=0x01,err=0x00 the first time (??) */
@@ -2099,6 +2100,7 @@
 	if (ide_cdrom_get_capabilities(cdi,&buf))
 		return 0;
 #endif /* __ACER50__ */
+#endif /* CONFIG_IA64_SOFTSDV_HACKS */
 
         cdi->speed = CDROM_STATE_FLAGS (drive)->current_speed;
         return 0;
drivers/net/eepro100.c +11 -2
diff -urN linux-davidm/drivers/net/eepro100.c linux-2.3.99-pre6-lia/drivers/net/eepro100.c
@@ -50,9 +50,18 @@
 static int txdmacount = 128;
 static int rxdmacount = 0;
 
+#ifdef __ia64__
+/*
+ * Bug: this driver may generate unaligned accesses when not copying
+ * an incoming packet.  Setting rx_copybreak to a large value force a
+ * copy and prevents unaligned accesses.
+ */
+static int rx_copybreak = 0x10000;
+#else
 /* Set the copy breakpoint for the copy-only-tiny-buffer Rx method.
    Lower values use more memory, but are faster. */
 static int rx_copybreak = 200;
+#endif
 
 /* Maximum events (Rx packets, etc.) to handle at each interrupt. */
 static int max_interrupt_work = 20;
@@ -429,14 +438,14 @@
 
 /* The Speedo3 Rx and Tx frame/buffer descriptors. */
 struct descriptor {			    /* A generic descriptor. */
-	s32 cmd_status;				/* All command and status fields. */
+	volatile s32 cmd_status;	/* All command and status fields. */
 	u32 link;				    /* struct descriptor *  */
 	unsigned char params[0];
 };
 
 /* The Speedo3 Rx and Tx buffer descriptors. */
 struct RxFD {					/* Receive frame descriptor. */
-	s32 status;
+	volatile s32 status;
 	u32 link;					/* struct RxFD * */
 	u32 rx_buf_addr;			/* void * */
 	u32 count;
drivers/usb/devices.c +1 -0
diff -urN linux-davidm/drivers/usb/devices.c linux-2.3.99-pre6-lia/drivers/usb/devices.c
@@ -53,6 +53,7 @@
 #include <linux/mm.h>
 #include <linux/slab.h>
 #include <linux/poll.h>
+#include <linux/smp_lock.h>
 #include <linux/usb.h>
 #include <linux/usbdevice_fs.h>
 #include <asm/uaccess.h>
drivers/usb/uhci.c +46 -1

65 lines not on this page · raw message

include/asm-ia64/processor.h +2 -1
diff -urN linux-davidm/include/asm-ia64/processor.h linux-2.3.99-pre6-lia/include/asm-ia64/processor.h
@@ -264,7 +264,8 @@
 
 #define SET_UNALIGN_CTL(task,value)								\
 ({												\
-	(task)->thread.flags |= ((value) << IA64_THREAD_UAC_SHIFT) & IA64_THREAD_UAC_MASK;	\
+	(task)->thread.flags = (((task)->thread.flags & ~IA64_THREAD_UAC_MASK)			\
+				| (((value) << IA64_THREAD_UAC_SHIFT) & IA64_THREAD_UAC_MASK));	\
 	0;											\
 })
 #define GET_UNALIGN_CTL(task,addr)								\
include/asm-ia64/spinlock.h +0 -2
diff -urN linux-davidm/include/asm-ia64/spinlock.h linux-2.3.99-pre6-lia/include/asm-ia64/spinlock.h
@@ -11,8 +11,6 @@
 
 #include <linux/kernel.h>
 
-#include <linux/kernel.h>
-
 #include <asm/system.h>
 #include <asm/bitops.h>
 #include <asm/atomic.h>
ipc/util.c +4 -0
diff -urN linux-davidm/ipc/util.c linux-2.3.99-pre6-lia/ipc/util.c
@@ -229,6 +229,8 @@
 	out->seq	= in->seq;
 }
 
+#ifndef __ia64__
+
 int ipc_parse_version (int *cmd)
 {
 	if (*cmd & IPC_64) {
@@ -238,6 +240,8 @@
 		return IPC_OLD;
 	}
 }
+
+#endif /* __ia64__ */
 
 #else
 /*
ipc/util.h +5 -0
diff -urN linux-davidm/ipc/util.h linux-2.3.99-pre6-lia/ipc/util.h
@@ -99,4 +99,9 @@
 void kernel_to_ipc64_perm(struct kern_ipc_perm *in, struct ipc64_perm *out);
 void ipc64_perm_to_ipc_perm(struct ipc64_perm *in, struct ipc_perm *out);
 
+#ifdef __ia64__
+  /* On IA-64, we always use the "64-bit version" of the IPC structures.  */ 
+# define ipc_parse_version(cmd)	IPC_64
+#else
 int ipc_parse_version (int *cmd);
+#endif
#10 lore raw

Re: [Linux-ia64] new kernel diff (relative to v2.3.99-pre6)

In reply to David Mosberger
Quoted 3 lines · David Mosberger

The full diff is at ftp.kernel.org:/pub/linux/kernel/ports/ia64/ in:

	linux-2.3.99-pre6-ia64-000501.diff.bz2

I'm getting some rejects when I attempt to apply this patch against linux-2.3.99-pre6.tar.bz2. Specifically,

$ bzip2 -dc ../../linux-2.3.99-pre6-ia64-000501.diff.bz2 | patch -p1
[...]
patching file `drivers/ide/ide-cd.c'
Hunk #1 FAILED at 2075.
Hunk #2 FAILED at 2100.
2 out of 2 hunks FAILED -- saving rejects to drivers/ide/ide-cd.c.rej
patching file `drivers/usb/devices.c'
Hunk #1 succeeded at 53 with fuzz 2.
patching file `drivers/usb/uhci.c'
Hunk #3 succeeded at 2340 (offset 108 lines).
patching file `init/main.c'
Hunk #1 succeeded at 109 (offset 4 lines).
Hunk #2 FAILED at 527.
1 out of 2 hunks FAILED -- saving rejects to init/main.c.rej

(Most of the patch succeeded; I'm only showing the parts that had problems.)

Kevin

Signature · 2 lines
Kevin Buettner
[email protected], [email protected]
#11 lore raw

Re: [Linux-ia64] new kernel diff (relative to v2.3.99-pre6)

In reply to David Mosberger

Gee, my 2.3.99-pre6 tree sure doesn't look anything like Linus's tar ball! I must have missed a patch at one point or another. I'm working on updating the patch...

	--david
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Kevin Buettner
Quoted 4 lines · David Mosberger
Quoted 4 lines

The full diff is at ftp.kernel.org:/pub/linux/kernel/ports/ia64/ in:

linux-2.3.99-pre6-ia64-000501.diff.bz2

Kevin> I'm getting some rejects when I attempt to apply this patch Kevin> against linux-2.3.99-pre6.tar.bz2. Specifically,

Kevin> $ bzip2 -dc ../../linux-2.3.99-pre6-ia64-000501.diff.bz2 | Kevin> patch -p1 [...] patching file drivers/ide/ide-cd.c' Hunk #1 Kevin> FAILED at 2075. Hunk #2 FAILED at 2100. 2 out of 2 hunks Kevin> FAILED -- saving rejects to drivers/ide/ide-cd.c.rej patching Kevin> file drivers/usb/devices.c' Hunk #1 succeeded at 53 with Kevin> fuzz 2. patching file drivers/usb/uhci.c' Hunk #3 succeeded Kevin> at 2340 (offset 108 lines). patching file init/main.c' Hunk Kevin> #1 succeeded at 109 (offset 4 lines). Hunk #2 FAILED at 527. Kevin> 1 out of 2 hunks FAILED -- saving rejects to init/main.c.rej

Kevin> (Most of the patch succeeded; I'm only showing the parts that Kevin> had problems.)

Kevin> Kevin

Kevin> -- Kevin Buettner [email protected], [email protected]

#12 lore raw

Re: [Linux-ia64] new kernel diff (relative to v2.3.99-pre6)

In reply to David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Kevin Buettner
Quoted 4 lines · David Mosberger
Quoted 4 lines

The full diff is at ftp.kernel.org:/pub/linux/kernel/ports/ia64/ in:

linux-2.3.99-pre6-ia64-000501.diff.bz2

Kevin> I'm getting some rejects when I attempt to apply this patch Kevin> against linux-2.3.99-pre6.tar.bz2. Specifically,

OK, I updated the patch at ftp.kernel.org:/pub/linux/kernel/ports/ia64. Same filename (linux-2.3.99-pre6-ia64-000501.diff.gz).

	--david