diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/Kconfig linux-2.5/arch/parisc/Kconfig
--- ../.#prev/linux-2.5/arch/parisc/Kconfig Mon May 5 10:05:33 2003
+++ linux-2.5/arch/parisc/Kconfig Mon May 12 05:49:49 2003
@@ -103,11 +103,6 @@
enable this option otherwise. The 64bit kernel is significantly bigger
and slower than the 32bit one.
-config COMPAT
- bool
- depends on PARISC64
- default y
-
config PDC_NARROW
bool "32-bit firmware"
depends on PARISC64
@@ -145,6 +140,14 @@
# bool "Preemptible Kernel"
default n
+config COMPAT
+ bool
+ depends on PARISC64
+ default y
+
+config HPUX
+ bool "Support for HP-UX binaries"
+
config NR_CPUS
int "Maximum number of CPUs (2-32)"
depends on SMP
@@ -165,6 +168,7 @@
config BINFMT_SOM
tristate "Kernel support for SOM binaries"
+ depends on HPUX
help
SOM is a binary executable format inherited from HP/UX. Say Y here
to be able to load and execute SOM binaries directly.
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/Makefile linux-2.5/arch/parisc/Makefile
--- ../.#prev/linux-2.5/arch/parisc/Makefile Mon Mar 24 18:58:47 2003
+++ linux-2.5/arch/parisc/Makefile Mon May 12 05:49:49 2003
@@ -57,8 +57,10 @@
CFLAGS += $(cflags-y)
-core-y += $(addprefix arch/parisc/, kernel/pdc_cons.o kernel/process.o \
- mm/ kernel/ hpux/ math-emu/ kernel/init_task.o )
+kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o
+kernel-$(CONFIG_HPUX) += hpux/
+
+core-y += $(addprefix arch/parisc/, $(kernel-y))
libs-y += arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
drivers-$(CONFIG_OPROFILE) += arch/parisc/oprofile/
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/Makefile linux-2.5/arch/parisc/kernel/Makefile
--- ../.#prev/linux-2.5/arch/parisc/kernel/Makefile Mon Mar 24 18:58:47 2003
+++ linux-2.5/arch/parisc/kernel/Makefile Fri Mar 28 09:52:19 2003
@@ -4,8 +4,7 @@
head-y := head.o
head-$(CONFIG_PARISC64) := head64.o
-extra-y := init_task.o pdc_cons.o process.o \
- unaligned.o $(head-y)
+extra-y := init_task.o $(head-y)
AFLAGS_entry.o := -traditional
AFLAGS_pacache.o := -traditional
@@ -14,7 +13,7 @@
pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
ptrace.o hardware.o inventory.o drivers.o semaphore.o \
signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o \
- processor.o pdc_chassis.o
+ process.o processor.o pdc_cons.o pdc_chassis.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_PA11) += pci-dma.o
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/entry.S linux-2.5/arch/parisc/kernel/entry.S
--- ../.#prev/linux-2.5/arch/parisc/kernel/entry.S Mon Mar 24 18:58:48 2003
+++ linux-2.5/arch/parisc/kernel/entry.S Tue May 27 15:05:34 2003
@@ -546,7 +546,7 @@
LDREG -PT_SZ_ALGN-RP_OFFSET(%r30), %r2
ldo -PT_SZ_ALGN(%r30), %r30
bv %r0(%r2)
- ldw TASK_PID(%r28), %r28
+ nop
/*
* Child Returns here
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/ioctl32.c linux-2.5/arch/parisc/kernel/ioctl32.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/ioctl32.c Tue May 27 06:58:32 2003
+++ linux-2.5/arch/parisc/kernel/ioctl32.c Tue May 27 11:21:38 2003
@@ -1785,9 +1785,6 @@
return -EINVAL;
}
-#ifdef CONFIG_GENRTC
-#endif
-
#if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
/* This really belongs in include/linux/drm.h -DaveM */
#include "../../../drivers/char/drm/drm.h"
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/irq.c linux-2.5/arch/parisc/kernel/irq.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/irq.c Mon May 5 10:05:34 2003
+++ linux-2.5/arch/parisc/kernel/irq.c Mon May 5 15:34:24 2003
@@ -43,8 +43,8 @@
#undef DEBUG_IRQ
#undef PARISC_IRQ_CR16_COUNTS
-extern void timer_interrupt(int, void *, struct pt_regs *);
-extern void ipi_interrupt(int, void *, struct pt_regs *);
+extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *);
+extern irqreturn_t ipi_interrupt(int, void *, struct pt_regs *);
#ifdef DEBUG_IRQ
#define DBG_IRQ(irq, x) if ((irq) != TIMER_IRQ) printk x
@@ -583,7 +583,7 @@
/* FIXME: SMP, flags, bottom halves, rest */
int request_irq(unsigned int irq,
- void (*handler)(int, void *, struct pt_regs *),
+ irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long irqflags,
const char * devname,
void *dev_id)
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/module.c linux-2.5/arch/parisc/kernel/module.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/module.c Tue May 27 06:58:32 2003
+++ linux-2.5/arch/parisc/kernel/module.c Thu Jun 12 15:18:06 2003
@@ -27,12 +27,39 @@
#include <linux/string.h>
#include <linux/kernel.h>
-#if 1
+#if 0
#define DEBUGP printk
#else
#define DEBUGP(fmt...)
#endif
+#define CHECK_RELOC(val, bits) \
+ if ( ( !((val) & (1<<((bits)-1))) && ((val)>>(bits)) != 0 ) || \
+ ( ((val) & (1<<((bits)-1))) && ((val)>>(bits)) != (((__typeof__(val))(~0))>>((bits)+2)))) { \
+ printk(KERN_ERR "module %s relocation of symbol %s is out of range (0x%lx in %d bits)\n", \
+ me->name, strtab + sym->st_name, (unsigned long)val, bits); \
+ return -ENOEXEC; \
+ }
+
+/* three functions to determine where in the module core
+ * or init pieces the location is */
+static inline int is_init(struct module *me, void *loc)
+{
+ return (loc >= me->module_init &&
+ loc <= (me->module_init + me->init_size));
+}
+
+static inline int is_core(struct module *me, void *loc)
+{
+ return (loc >= me->module_core &&
+ loc <= (me->module_core + me->core_size));
+}
+
+static inline int is_local(struct module *me, void *loc)
+{
+ return is_init(me, loc) || is_core(me, loc);
+}
+
#ifndef __LP64__
struct got_entry {
@@ -40,8 +67,8 @@
};
struct fdesc_entry {
- Elf32_Addr gp;
Elf32_Addr addr;
+ Elf32_Addr gp;
};
struct stub_entry {
@@ -54,8 +81,8 @@
struct fdesc_entry {
Elf64_Addr dummy[2];
- Elf64_Addr gp;
Elf64_Addr addr;
+ Elf64_Addr gp;
};
struct stub_entry {
@@ -167,7 +194,7 @@
static inline unsigned long count_fdescs(const Elf_Rela *rela, unsigned long n)
{
- unsigned long cnt = 3; /* 3 for finalize */
+ unsigned long cnt = 0;
for (; n > 0; n--, rela++)
{
@@ -211,7 +238,7 @@
CONST char *secstrings,
struct module *me)
{
- unsigned long gots = 0, fdescs = 0, stubs = 0;
+ unsigned long gots = 0, fdescs = 0, stubs = 0, init_stubs = 0;
unsigned int i;
for (i = 1; i < hdr->e_shnum; i++) {
@@ -228,7 +255,11 @@
*/
gots += count_gots(rels, nrels);
fdescs += count_fdescs(rels, nrels);
- stubs += count_stubs(rels, nrels);
+ if(strncmp(secstrings + sechdrs[i].sh_name,
+ ".rela.init", 10) == 0)
+ init_stubs += count_stubs(rels, nrels);
+ else
+ stubs += count_stubs(rels, nrels);
}
/* align things a bit */
@@ -238,16 +269,26 @@
me->core_size = ALIGN(me->core_size, 16);
me->arch.fdesc_offset = me->core_size;
- me->core_size += stubs * sizeof(struct fdesc_entry);
+ me->core_size += fdescs * sizeof(struct fdesc_entry);
me->core_size = ALIGN(me->core_size, 16);
me->arch.stub_offset = me->core_size;
me->core_size += stubs * sizeof(struct stub_entry);
+ me->init_size = ALIGN(me->init_size, 16);
+ me->arch.init_stub_offset = me->init_size;
+ me->init_size += init_stubs * sizeof(struct stub_entry);
+
+ me->arch.got_max = gots;
+ me->arch.fdesc_max = fdescs;
+ me->arch.stub_max = stubs;
+ me->arch.init_stub_max = init_stubs;
+
return 0;
}
-static Elf_Addr get_got(struct module *me, unsigned long value, long addend)
+#ifdef __LP64__
+static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
{
unsigned int i;
struct got_entry *got;
@@ -261,10 +302,14 @@
if (got[i].addr == value)
return i * sizeof(struct got_entry);
+ BUG_ON(++me->arch.got_count > me->arch.got_max);
+
got[i].addr = value;
return i * sizeof(struct got_entry);
}
+#endif /* __LP64__ */
+#ifdef __LP64__
static Elf_Addr get_fdesc(struct module *me, unsigned long value)
{
struct fdesc_entry *fdesc = me->module_core + me->arch.fdesc_offset;
@@ -281,32 +326,46 @@
fdesc++;
}
+ BUG_ON(++me->arch.fdesc_count > me->arch.fdesc_max);
+
/* Create new one */
fdesc->addr = value;
fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset;
return (Elf_Addr)fdesc;
}
+#endif /* __LP64__ */
static Elf_Addr get_stub(struct module *me, unsigned long value, long addend,
- int millicode)
+ int millicode, int init_section)
{
unsigned long i;
struct stub_entry *stub;
- i = me->arch.stub_count++;
- stub = me->module_core + me->arch.stub_offset +
- i * sizeof(struct stub_entry);
+ if(init_section) {
+ i = me->arch.init_stub_count++;
+ BUG_ON(me->arch.init_stub_count > me->arch.init_stub_max);
+ stub = me->module_init + me->arch.init_stub_offset +
+ i * sizeof(struct stub_entry);
+ } else {
+ i = me->arch.stub_count++;
+ BUG_ON(me->arch.stub_count > me->arch.stub_max);
+ stub = me->module_core + me->arch.stub_offset +
+ i * sizeof(struct stub_entry);
+ }
#ifndef __LP64__
/* for 32-bit the stub looks like this:
* ldil L'XXX,%r1
* be,n R'XXX(%sr4,%r1)
*/
+ //value = *(unsigned long *)((value + addend) & ~3); /* why? */
+
stub->insns[0] = 0x20200000; /* ldil L'XXX,%r1 */
stub->insns[1] = 0xe0202002; /* be,n R'XXX(%sr4,%r1) */
stub->insns[0] |= reassemble_21(lrsel(value, addend));
stub->insns[1] |= reassemble_17(rrsel(value, addend) / 4);
+
#else
/* for 64-bit we have two kinds of stubs:
* for normal function calls:
@@ -328,7 +387,7 @@
stub->insns[2] = 0xe820d000; /* bve (%r1) */
stub->insns[3] = 0x537b0030; /* ldd 18(%dp),%dp */
- stub->insns[0] |= reassemble_21(get_got(me, value, addend));
+ stub->insns[0] |= reassemble_14(rrsel(get_got(me, value, addend),0));
}
else
{
@@ -371,6 +430,7 @@
Elf32_Addr val;
Elf32_Sword addend;
Elf32_Addr dot;
+ //unsigned long dp = (unsigned long)$global$;
register unsigned long dp asm ("r27");
DEBUGP("Applying relocate section %u to %u\n", relsec,
@@ -387,7 +447,8 @@
me->name, strtab + sym->st_name);
return -ENOENT;
}
- dot = (sechdrs[relsec].sh_addr + rel->r_offset) & ~0x03;
+ //dot = (sechdrs[relsec].sh_addr + rel->r_offset) & ~0x03;
+ dot = (Elf32_Addr)loc & ~0x03;
val = sym->st_value;
addend = rel[i].r_addend;
@@ -422,11 +483,13 @@
break;
case R_PARISC_DIR21L:
/* left 21 bits of effective address */
- *loc = mask(*loc, 21) | reassemble_21(lrsel(val, addend));
+ val = lrsel(val, addend);
+ *loc = mask(*loc, 21) | reassemble_21(val);
break;
case R_PARISC_DIR14R:
/* right 14 bits of effective address */
- *loc = mask(*loc, 14) | reassemble_14(rrsel(val, addend));
+ val = rrsel(val, addend);
+ *loc = mask(*loc, 14) | reassemble_14(val);
break;
case R_PARISC_SEGREL32:
/* 32-bit segment relative address */
@@ -435,23 +498,27 @@
break;
case R_PARISC_DPREL21L:
/* left 21 bit of relative address */
- val -= dp;
- *loc = mask(*loc, 21) | reassemble_21(lrsel(val, addend) - dp);
+ val = lrsel(val - dp, addend);
+ *loc = mask(*loc, 21) | reassemble_21(val);
break;
case R_PARISC_DPREL14R:
/* right 14 bit of relative address */
- val -= dp;
- *loc = mask(*loc, 14) | reassemble_14(rrsel(val, addend) - dp);
+ val = rrsel(val - dp, addend);
+ *loc = mask(*loc, 14) | reassemble_14(val);
break;
case R_PARISC_PCREL17F:
/* 17-bit PC relative address */
- val = get_stub(me, val, addend, 0) - dot - 8;
- *loc = (*loc&0x1f1ffd) | reassemble_17(val);
+ val = get_stub(me, val, addend, 0, is_init(me, loc));
+ val = (val - dot - 8)/4;
+ CHECK_RELOC(val, 17)
+ *loc = (*loc & ~0x1f1ffd) | reassemble_17(val);
break;
case R_PARISC_PCREL22F:
/* 22-bit PC relative address; only defined for pa20 */
- val = get_stub(me, val, addend, 0) - dot - 8;
- *loc = (*loc&0x3ff1ffd) | reassemble_22(val);
+ val = get_stub(me, val, addend, 0, is_init(me, loc));
+ val = (val - dot - 8)/4;
+ CHECK_RELOC(val, 22);
+ *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
break;
default:
@@ -475,6 +542,7 @@
Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr;
Elf64_Sym *sym;
Elf64_Word *loc;
+ Elf64_Xword *loc64;
Elf64_Addr val;
Elf64_Sxword addend;
Elf64_Addr dot;
@@ -493,14 +561,16 @@
me->name, strtab + sym->st_name);
return -ENOENT;
}
- dot = (sechdrs[relsec].sh_addr + rel->r_offset) & ~0x03;
+ //dot = (sechdrs[relsec].sh_addr + rel->r_offset) & ~0x03;
+ dot = (Elf64_Addr)loc & ~0x03;
+ loc64 = (Elf64_Xword *)loc;
val = sym->st_value;
addend = rel[i].r_addend;
-#if 1
+#if 0
#define r(t) ELF64_R_TYPE(rel[i].r_info)==t ? #t :
- DEBUGP("Symbol %s loc %p val 0x%Lx addend 0x%Lx: %s\n",
+ printk("Symbol %s loc %p val 0x%Lx addend 0x%Lx: %s\n",
strtab + sym->st_name,
loc, val, addend,
r(R_PARISC_LTOFF14R)
@@ -516,24 +586,56 @@
switch (ELF64_R_TYPE(rel[i].r_info)) {
case R_PARISC_LTOFF21L:
/* LT-relative; left 21 bits */
- *loc = mask(*loc, 21) | reassemble_21(get_got(me, val, addend));
+ val = get_got(me, val, addend);
+ DEBUGP("LTOFF21L Symbol %s loc %p val %lx\n",
+ strtab + sym->st_name,
+ loc, val);
+ val = lrsel(val, 0);
+ *loc = mask(*loc, 21) | reassemble_21(val);
break;
case R_PARISC_LTOFF14R:
/* L(ltoff(val+addend)) */
/* LT-relative; right 14 bits */
- *loc = mask(*loc, 14) | reassemble_14(get_got(me, val, addend));
+ val = get_got(me, val, addend);
+ val = rrsel(val, 0);
+ DEBUGP("LTOFF14R Symbol %s loc %p val %lx\n",
+ strtab + sym->st_name,
+ loc, val);
+ *loc = mask(*loc, 14) | reassemble_14(val);
break;
case R_PARISC_PCREL22F:
/* PC-relative; 22 bits */
- if (strncmp(strtab + sym->st_name, "$$", 2) == 0)
- val = get_stub(me, val, addend, 1) - dot - 8;
- else
- val = get_stub(me, val, addend, 0) - dot - 8;
- *loc = (*loc&0x3ff1ffd) | reassemble_22(val);
+ DEBUGP("PCREL22F Symbol %s loc %p val %lx\n",
+ strtab + sym->st_name,
+ loc, val);
+ /* can we reach it locally? */
+ if(!is_local(me, (void *)val)) {
+ if (strncmp(strtab + sym->st_name, "$$", 2)
+ == 0)
+ val = get_stub(me, val, addend, 1,
+ is_init(me, loc));
+ else
+ val = get_stub(me, val, addend, 0,
+ is_init(me, loc));
+ }
+ /* FIXME: local symbols work as long as the
+ * core and init pieces aren't separated too
+ * far. If this is ever broken, you will trip
+ * the check below. The way to fix it would
+ * be to generate local stubs to go between init
+ * and core */
+ if((Elf64_Sxword)(val - dot - 8) > 0x800000 -1 ||
+ (Elf64_Sxword)(val - dot - 8) < -0x800000) {
+ printk(KERN_ERR "Module %s, symbol %s is out of range for PCREL22F relocation\n",
+ me->name, strtab + sym->st_name);
+ return -ENOEXEC;
+ }
+ val = (val - dot - 8)/4;
+ *loc = (*loc & ~0x3ff1ffd) | reassemble_22(val);
break;
case R_PARISC_DIR64:
/* 64-bit effective address */
- *loc = fsel(val, addend);
+ *loc64 = val + addend;
break;
case R_PARISC_SEGREL32:
/* 32-bit segment relative address */
@@ -542,7 +644,17 @@
break;
case R_PARISC_FPTR64:
/* 64-bit function address */
- *loc = get_fdesc(me, val+addend);
+ if(is_local(me, (void *)(val + addend))) {
+ *loc64 = get_fdesc(me, val+addend);
+ } else {
+ /* if the symbol is not local to this
+ * module then val+addend is a pointer
+ * to the function descriptor */
+ DEBUGP("Non local FPTR64 Symbol %s loc %p val %lx\n",
+ strtab + sym->st_name,
+ loc, val);
+ *loc64 = val + addend;
+ }
break;
default:
@@ -559,13 +671,26 @@
const Elf_Shdr *sechdrs,
struct module *me)
{
-#ifdef __LP64__
- me->init = (void *)get_fdesc(me, (Elf_Addr)me->init);
-#ifdef CONFIG_MODULE_UNLOAD
- if (me->exit)
- me->exit = (void *)get_fdesc(me, (Elf_Addr)me->exit);
-#endif
+#ifdef DEBUG
+ struct fdesc_entry *entry;
+ u32 *addr;
+
+ entry = (struct fdesc_entry *)me->init;
+ printk("FINALIZE, ->init FPTR is %p, GP %lx ADDR %lx\n", entry,
+ entry->gp, entry->addr);
+ addr = (u32 *)entry->addr;
+ printk("INSNS: %x %x %x %x\n",
+ addr[0], addr[1], addr[2], addr[3]);
+ printk("stubs used %ld, stubs max %ld\n"
+ "init_stubs used %ld, init stubs max %ld\n"
+ "got entries used %ld, gots max %ld\n"
+ "fdescs used %ld, fdescs max %ld\n",
+ me->arch.stub_count, me->arch.stub_max,
+ me->arch.init_stub_count, me->arch.init_stub_max,
+ me->arch.got_count, me->arch.got_max,
+ me->arch.fdesc_count, me->arch.fdesc_max);
#endif
+
return 0;
}
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/parisc_ksyms.c linux-2.5/arch/parisc/kernel/parisc_ksyms.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/parisc_ksyms.c Mon Feb 24 15:44:51 2003
+++ linux-2.5/arch/parisc/kernel/parisc_ksyms.c Sun Jun 8 20:24:25 2003
@@ -7,22 +7,24 @@
#include <linux/kernel.h>
#include <linux/string.h>
-EXPORT_SYMBOL_NOVERS(memscan);
-EXPORT_SYMBOL_NOVERS(memset);
+EXPORT_SYMBOL(memchr);
EXPORT_SYMBOL(memcmp);
-EXPORT_SYMBOL_NOVERS(memcpy);
+EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memmove);
+EXPORT_SYMBOL(memscan);
+EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(strcat);
EXPORT_SYMBOL(strchr);
-EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strcpy);
EXPORT_SYMBOL(strlen);
-EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strncat);
EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(strncpy);
+EXPORT_SYMBOL(strnlen);
+EXPORT_SYMBOL(strrchr);
EXPORT_SYMBOL(strstr);
+EXPORT_SYMBOL(strpbrk);
#include <asm/hardware.h> /* struct parisc_device for asm/pci.h */
#include <linux/pci.h>
@@ -39,7 +41,6 @@
#include <asm/processor.h>
EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(boot_cpu_data);
-EXPORT_SYMBOL(map_hpux_gateway_page);
#ifdef CONFIG_EISA
EXPORT_SYMBOL(EISA_bus);
#endif
@@ -72,12 +73,16 @@
#ifndef __LP64__
/* Needed so insmod can set dp value */
extern int $global$;
-EXPORT_SYMBOL_NOVERS($global$);
+EXPORT_SYMBOL($global$);
#endif
EXPORT_SYMBOL(register_parisc_driver);
EXPORT_SYMBOL(unregister_parisc_driver);
+EXPORT_SYMBOL(print_pci_hwpath);
+EXPORT_SYMBOL(print_pa_hwpath);
EXPORT_SYMBOL(pdc_iodc_read);
+EXPORT_SYMBOL(pdc_tod_read);
+EXPORT_SYMBOL(pdc_tod_set);
#include <asm/io.h>
EXPORT_SYMBOL(__ioremap);
@@ -105,7 +110,12 @@
#include <asm/cache.h>
EXPORT_SYMBOL(flush_kernel_dcache_range_asm);
EXPORT_SYMBOL(flush_kernel_dcache_page);
+EXPORT_SYMBOL(flush_data_cache_local);
+EXPORT_SYMBOL(flush_kernel_icache_range_asm);
+EXPORT_SYMBOL(__flush_dcache_page);
EXPORT_SYMBOL(flush_all_caches);
+EXPORT_SYMBOL(dcache_stride);
+EXPORT_SYMBOL(flush_cache_all_local);
#include <asm/unistd.h>
extern long sys_open(const char *, int, int);
@@ -131,6 +141,7 @@
EXPORT_SYMBOL(pdc_add_valid);
EXPORT_SYMBOL(pdc_lan_station_id);
EXPORT_SYMBOL(pdc_get_initiator);
+EXPORT_SYMBOL(pdc_sti_call);
extern void $$divI(void);
extern void $$divU(void);
@@ -156,39 +167,39 @@
extern void $$divI_14(void);
extern void $$divI_15(void);
-EXPORT_SYMBOL_NOVERS($$divI);
-EXPORT_SYMBOL_NOVERS($$divU);
-EXPORT_SYMBOL_NOVERS($$remI);
-EXPORT_SYMBOL_NOVERS($$remU);
-EXPORT_SYMBOL_NOVERS($$mulI);
-EXPORT_SYMBOL_NOVERS($$divU_3);
-EXPORT_SYMBOL_NOVERS($$divU_5);
-EXPORT_SYMBOL_NOVERS($$divU_6);
-EXPORT_SYMBOL_NOVERS($$divU_9);
-EXPORT_SYMBOL_NOVERS($$divU_10);
-EXPORT_SYMBOL_NOVERS($$divU_12);
-EXPORT_SYMBOL_NOVERS($$divU_7);
-EXPORT_SYMBOL_NOVERS($$divU_14);
-EXPORT_SYMBOL_NOVERS($$divU_15);
-EXPORT_SYMBOL_NOVERS($$divI_3);
-EXPORT_SYMBOL_NOVERS($$divI_5);
-EXPORT_SYMBOL_NOVERS($$divI_6);
-EXPORT_SYMBOL_NOVERS($$divI_7);
-EXPORT_SYMBOL_NOVERS($$divI_9);
-EXPORT_SYMBOL_NOVERS($$divI_10);
-EXPORT_SYMBOL_NOVERS($$divI_12);
-EXPORT_SYMBOL_NOVERS($$divI_14);
-EXPORT_SYMBOL_NOVERS($$divI_15);
+EXPORT_SYMBOL($$divI);
+EXPORT_SYMBOL($$divU);
+EXPORT_SYMBOL($$remI);
+EXPORT_SYMBOL($$remU);
+EXPORT_SYMBOL($$mulI);
+EXPORT_SYMBOL($$divU_3);
+EXPORT_SYMBOL($$divU_5);
+EXPORT_SYMBOL($$divU_6);
+EXPORT_SYMBOL($$divU_9);
+EXPORT_SYMBOL($$divU_10);
+EXPORT_SYMBOL($$divU_12);
+EXPORT_SYMBOL($$divU_7);
+EXPORT_SYMBOL($$divU_14);
+EXPORT_SYMBOL($$divU_15);
+EXPORT_SYMBOL($$divI_3);
+EXPORT_SYMBOL($$divI_5);
+EXPORT_SYMBOL($$divI_6);
+EXPORT_SYMBOL($$divI_7);
+EXPORT_SYMBOL($$divI_9);
+EXPORT_SYMBOL($$divI_10);
+EXPORT_SYMBOL($$divI_12);
+EXPORT_SYMBOL($$divI_14);
+EXPORT_SYMBOL($$divI_15);
extern void __ashrdi3(void);
extern void __ashldi3(void);
extern void __lshrdi3(void);
extern void __muldi3(void);
-EXPORT_SYMBOL_NOVERS(__ashrdi3);
-EXPORT_SYMBOL_NOVERS(__ashldi3);
-EXPORT_SYMBOL_NOVERS(__lshrdi3);
-EXPORT_SYMBOL_NOVERS(__muldi3);
+EXPORT_SYMBOL(__ashrdi3);
+EXPORT_SYMBOL(__ashldi3);
+EXPORT_SYMBOL(__lshrdi3);
+EXPORT_SYMBOL(__muldi3);
#ifdef __LP64__
extern void __divdi3(void);
@@ -196,16 +207,16 @@
extern void __umoddi3(void);
extern void __moddi3(void);
-EXPORT_SYMBOL_NOVERS(__divdi3);
-EXPORT_SYMBOL_NOVERS(__udivdi3);
-EXPORT_SYMBOL_NOVERS(__umoddi3);
-EXPORT_SYMBOL_NOVERS(__moddi3);
+EXPORT_SYMBOL(__divdi3);
+EXPORT_SYMBOL(__udivdi3);
+EXPORT_SYMBOL(__umoddi3);
+EXPORT_SYMBOL(__moddi3);
#endif
#ifndef __LP64__
extern void $$dyncall(void);
-EXPORT_SYMBOL_NOVERS($$dyncall);
+EXPORT_SYMBOL($$dyncall);
#endif
#include <asm/pgtable.h>
-EXPORT_SYMBOL_NOVERS(vmalloc_start);
+EXPORT_SYMBOL(vmalloc_start);
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/pdc_cons.c linux-2.5/arch/parisc/kernel/pdc_cons.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/pdc_cons.c Tue Jan 14 06:08:03 2003
+++ linux-2.5/arch/parisc/kernel/pdc_cons.c Sun Jun 1 05:14:22 2003
@@ -24,6 +24,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/major.h>
+#include <linux/tty.h>
#include <asm/page.h>
#include <asm/types.h>
#include <asm/system.h>
@@ -52,12 +53,24 @@
return 0;
}
-#if defined(CONFIG_PDC_CONSOLE) || defined(CONFIG_SERIAL_MUX)
+#if defined(CONFIG_PDC_CONSOLE)
#define PDC_CONSOLE_DEVICE pdc_console_device
-static kdev_t pdc_console_device (struct console *c)
+static struct tty_driver * pdc_console_device (struct console *c, int *index)
+{
+ extern struct tty_driver console_driver;
+ *index = c->index ? c->index-1 : fg_console;
+ return &console_driver;
+}
+
+#elif defined(CONFIG_SERIAL_MUX)
+#warning CONFIG_SERIAL_MUX
+#define PDC_CONSOLE_DEVICE pdc_console_device
+#warning "FIXME - should be: static struct tty_driver * pdc_console_device (struct console *c, int *index)"
+static kdev_t pdc_console_device (struct console *c, int *index)
{
return mk_kdev(MUX_MAJOR, 0);
}
+
#else
#define PDC_CONSOLE_DEVICE NULL
#endif
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/process.c linux-2.5/arch/parisc/kernel/process.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/process.c Mon Mar 24 18:58:48 2003
+++ linux-2.5/arch/parisc/kernel/process.c Tue May 27 15:05:34 2003
@@ -10,33 +10,23 @@
#define __KERNEL_SYSCALLS__
#include <stdarg.h>
+#include <linux/elf.h>
#include <linux/errno.h>
-#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/smp_lock.h>
+#include <linux/personality.h>
+#include <linux/ptrace.h>
+#include <linux/sched.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
-#include <linux/ptrace.h>
-#include <linux/slab.h>
-#include <linux/vmalloc.h>
-#include <linux/interrupt.h>
-#include <linux/reboot.h>
-#include <linux/init.h>
#include <linux/version.h>
-#include <linux/elf.h>
-#include <linux/personality.h>
-#include <asm/machdep.h>
-#include <asm/offsets.h>
-#include <asm/uaccess.h>
-#include <asm/pgtable.h>
-#include <asm/pgalloc.h>
-#include <asm/system.h>
#include <asm/io.h>
-#include <asm/processor.h>
+#include <asm/offsets.h>
+#include <asm/pdc.h>
#include <asm/pdc_chassis.h>
+#include <asm/pgalloc.h>
+#include <asm/uaccess.h>
int hlt_counter;
@@ -224,18 +214,14 @@
sys_clone(unsigned long clone_flags, unsigned long usp,
struct pt_regs *regs)
{
- struct task_struct *p;
int *user_tid = (int *)regs->gr[26];
- p = do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, user_tid, NULL);
- return IS_ERR(p) ? PTR_ERR(p) : p->pid;
+ return do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, user_tid, NULL);
}
int
sys_vfork(struct pt_regs *regs)
{
- struct task_struct *p;
- p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gr[30], regs, 0, NULL, NULL);
- return IS_ERR(p) ? PTR_ERR(p) : p->pid;
+ return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gr[30], regs, 0, NULL, NULL);
}
int
@@ -251,7 +237,9 @@
* Make them const so the compiler knows they live in .text */
extern void * const ret_from_kernel_thread;
extern void * const child_return;
+#ifdef CONFIG_HPUX
extern void * const hpux_child_return;
+#endif
*cregs = *pregs;
@@ -295,7 +283,11 @@
+ (pregs->gr[21] & (INIT_THREAD_SIZE - 1));
cregs->gr[30] = usp;
if (p->personality == PER_HPUX) {
+#ifdef CONFIG_HPUX
cregs->kpc = (unsigned long) &hpux_child_return;
+#else
+ BUG();
+#endif
} else {
cregs->kpc = (unsigned long) &child_return;
}
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/processor.c linux-2.5/arch/parisc/kernel/processor.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/processor.c Tue Jan 14 06:08:04 2003
+++ linux-2.5/arch/parisc/kernel/processor.c Sun Mar 23 13:14:52 2003
@@ -145,6 +145,7 @@
/* initialize counters */
memset(p, 0, sizeof(struct cpuinfo_parisc));
+ p->loops_per_jiffy = loops_per_jiffy;
p->dev = dev; /* Save IODC data in case we need it */
p->hpa = dev->hpa; /* save CPU hpa */
p->cpuid = cpuid; /* save CPU id */
@@ -356,8 +357,8 @@
show_cache_info(m);
seq_printf(m, "bogomips\t: %lu.%02lu\n",
- loops_per_jiffy / (500000 / HZ),
- (loops_per_jiffy / (5000 / HZ)) % 100);
+ cpu_data[n].loops_per_jiffy / (500000 / HZ),
+ (cpu_data[n].loops_per_jiffy / (5000 / HZ)) % 100);
seq_printf(m, "software id\t: %ld\n\n",
boot_cpu_data.pdc.model.sw_id);
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/signal.c linux-2.5/arch/parisc/kernel/signal.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/signal.c Mon Mar 24 18:58:49 2003
+++ linux-2.5/arch/parisc/kernel/signal.c Sun Mar 23 13:14:52 2003
@@ -309,7 +309,8 @@
}
#endif
-#if CACHE_FLUSHING_IS_NOT_BROKEN
+#undef CACHE_FLUSHING_IS_NOT_BROKEN
+#ifdef CACHE_FLUSHING_IS_NOT_BROKEN
flush_user_icache_range((unsigned long) &frame->tramp[0],
(unsigned long) &frame->tramp[4]);
#else
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/smp.c linux-2.5/arch/parisc/kernel/smp.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/smp.c Wed Mar 5 12:08:02 2003
+++ linux-2.5/arch/parisc/kernel/smp.c Tue May 27 15:27:16 2003
@@ -147,7 +147,7 @@
}
-void
+irqreturn_t
ipi_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
int this_cpu = smp_processor_id();
@@ -256,7 +256,7 @@
} /* Switch */
} /* while (ops) */
}
- return;
+ return IRQ_HANDLED;
}
@@ -515,14 +515,14 @@
* don't care about the regs settings since
* we'll never reschedule the forked task.
*/
- return do_fork(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL);
+ return copy_process(CLONE_VM|CLONE_IDLETASK, 0, ®s, 0, NULL, NULL);
}
/*
* Bring one cpu online.
*/
-static int smp_boot_one_cpu(int cpuid, int cpunum)
+static int __init smp_boot_one_cpu(int cpuid, int cpunum)
{
struct task_struct *idle;
long timeout;
@@ -537,9 +537,11 @@
* Sheesh . . .
*/
- if ((idle = fork_by_hand()) == 0)
+ idle = fork_by_hand();
+ if (IS_ERR(idle))
panic("SMP: fork failed for CPU:%d", cpuid);
+ wake_up_forked_process(idle);
init_idle(idle, cpunum);
unhash_process(idle);
idle->thread_info->cpu = cpunum;
@@ -613,7 +615,7 @@
void __init smp_boot_cpus(void)
{
int i, cpu_count = 1;
- unsigned long bogosum = loops_per_jiffy; /* Count Monarch */
+ unsigned long bogosum = cpu_data[0].loops_per_jiffy; /* Count Monarch */
/* REVISIT - assumes first CPU reported by PAT PDC is BSP */
int bootstrap_processor=cpu_data[0].cpuid; /* CPU ID of BSP */
@@ -650,7 +652,7 @@
if (smp_boot_one_cpu(cpu_data[i].cpuid, cpu_count) < 0)
continue;
- bogosum += loops_per_jiffy;
+ bogosum += cpu_data[i].loops_per_jiffy;
cpu_count++; /* Count good CPUs only... */
cpu_present_mask |= 1UL << i;
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/sys_parisc32.c linux-2.5/arch/parisc/kernel/sys_parisc32.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/sys_parisc32.c Mon May 5 10:05:34 2003
+++ linux-2.5/arch/parisc/kernel/sys_parisc32.c Mon May 5 11:05:48 2003
@@ -30,10 +30,7 @@
#include <linux/slab.h>
#include <linux/uio.h>
#include <linux/nfs_fs.h>
-#include <linux/smb_fs.h>
-#include <linux/smb_mount.h>
#include <linux/ncp_fs.h>
-#include <linux/quota.h>
#include <linux/sunrpc/svc.h>
#include <linux/nfsd/nfsd.h>
#include <linux/nfsd/cache.h>
@@ -42,11 +39,6 @@
#include <linux/poll.h>
#include <linux/personality.h>
#include <linux/stat.h>
-#include <linux/filter.h> /* for setsockopt() */
-#include <linux/icmpv6.h> /* for setsockopt() */
-#include <linux/netfilter_ipv4/ip_queue.h> /* for setsockopt() */
-#include <linux/netfilter_ipv4/ip_tables.h> /* for setsockopt() */
-#include <linux/netfilter_ipv6/ip6_tables.h> /* for setsockopt() */
#include <linux/highmem.h>
#include <linux/highuid.h>
#include <linux/mman.h>
@@ -62,9 +54,6 @@
#include "sys32.h"
-#define A(__x) ((unsigned long)(__x))
-
-
#undef DEBUG
#ifdef DEBUG
@@ -73,34 +62,6 @@
#define DBG(x)
#endif
-/* For this source file, we want overflow handling. */
-
-#undef high2lowuid
-#undef high2lowgid
-#undef low2highuid
-#undef low2highgid
-#undef SET_UID16
-#undef SET_GID16
-#undef NEW_TO_OLD_UID
-#undef NEW_TO_OLD_GID
-#undef SET_OLDSTAT_UID
-#undef SET_OLDSTAT_GID
-#undef SET_STAT_UID
-#undef SET_STAT_GID
-
-#define high2lowuid(uid) ((uid) > 65535) ? (u16)overflowuid : (u16)(uid)
-#define high2lowgid(gid) ((gid) > 65535) ? (u16)overflowgid : (u16)(gid)
-#define low2highuid(uid) ((uid) == (u16)-1) ? (uid_t)-1 : (uid_t)(uid)
-#define low2highgid(gid) ((gid) == (u16)-1) ? (gid_t)-1 : (gid_t)(gid)
-#define SET_UID16(var, uid) var = high2lowuid(uid)
-#define SET_GID16(var, gid) var = high2lowgid(gid)
-#define NEW_TO_OLD_UID(uid) high2lowuid(uid)
-#define NEW_TO_OLD_GID(gid) high2lowgid(gid)
-#define SET_OLDSTAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid)
-#define SET_OLDSTAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
-#define SET_STAT_UID(stat, uid) (stat).st_uid = high2lowuid(uid)
-#define SET_STAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
-
/*
* count32() counts the number of arguments/envelopes. It is basically
* a copy of count() from fs/exec.c, except that it works
@@ -145,7 +106,7 @@
if (get_user(str, argv + argc) ||
!str ||
- !(len = strnlen_user((char *)A(str), bprm->p)))
+ !(len = strnlen_user((char *)compat_ptr(str), bprm->p)))
return -EFAULT;
if (bprm->p < len)
@@ -181,7 +142,7 @@
if (new)
memset(kaddr+offset+len, 0, PAGE_SIZE-offset-len);
}
- err = copy_from_user(kaddr + offset, (char *)A(str), bytes_to_copy);
+ err = copy_from_user(kaddr + offset, (char *)compat_ptr(str), bytes_to_copy);
flush_dcache_page(page);
kunmap(page);
@@ -784,7 +745,7 @@
__get_user(len, &vector->iov_len);
__get_user(buf, &vector->iov_base);
tot_len += len;
- ivp->iov_base = (void *)A(buf);
+ ivp->iov_base = compat_ptr(buf);
ivp->iov_len = (compat_size_t) len;
vector++;
ivp++;
@@ -1214,67 +1175,6 @@
return ret;
}
-
-#include <linux/quota.h>
-
-struct dqblk32 {
- __u32 dqb_bhardlimit;
- __u32 dqb_bsoftlimit;
- __u32 dqb_curblocks;
- __u32 dqb_ihardlimit;
- __u32 dqb_isoftlimit;
- __u32 dqb_curinodes;
- compat_time_t dqb_btime;
- compat_time_t dqb_itime;
-};
-
-
-asmlinkage int sys32_quotactl(int cmd, const char *special, int id, unsigned long addr)
-{
-#if 0
- extern int sys_quotactl(int cmd, const char *special, int id, caddr_t addr);
- int cmds = cmd >> SUBCMDSHIFT;
- int err;
- struct dqblk d;
- char *spec;
-
- switch (cmds) {
- case Q_GETQUOTA:
- break;
- case Q_SETQUOTA:
- case Q_SETUSE:
- case Q_SETQLIM:
- if (copy_from_user (&d, (struct dqblk32 *)addr,
- sizeof (struct dqblk32)))
- return -EFAULT;
- d.dqb_itime = ((struct dqblk32 *)&d)->dqb_itime;
- d.dqb_btime = ((struct dqblk32 *)&d)->dqb_btime;
- break;
- default:
- return sys_quotactl(cmd, special,
- id, (caddr_t)addr);
- }
- spec = getname (special);
- err = PTR_ERR(spec);
- if (IS_ERR(spec)) return err;
- KERNEL_SYSCALL(err, sys_quotactl, cmd, (const char *)spec, id, (caddr_t)&d);
- putname (spec);
- if (cmds == Q_GETQUOTA) {
- __kernel_time_t b = d.dqb_btime, i = d.dqb_itime;
- ((struct dqblk32 *)&d)->dqb_itime = i;
- ((struct dqblk32 *)&d)->dqb_btime = b;
- if (copy_to_user ((struct dqblk32 *)addr, &d,
- sizeof (struct dqblk32)))
- return -EFAULT;
- }
- return err;
-#endif
- /* TODO */
- BUG();
- return -EINVAL;
-}
-
-
extern asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t *offset, size_t count);
typedef long __kernel_loff_t32; /* move this to asm/posix_types.h? */
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/syscall.S linux-2.5/arch/parisc/kernel/syscall.S
--- ../.#prev/linux-2.5/arch/parisc/kernel/syscall.S Mon May 5 10:05:34 2003
+++ linux-2.5/arch/parisc/kernel/syscall.S Mon May 5 11:05:48 2003
@@ -496,7 +496,7 @@
ENTRY_SAME(delete_module)
ENTRY_SAME(ni_syscall) /* 130: get_kernel_syms */
/* time_t inside struct dqblk */
- ENTRY_DIFF(quotactl) /* -- FIXME, doesn't work */
+ ENTRY_SAME(quotactl)
ENTRY_SAME(getpgid)
ENTRY_SAME(fchdir)
ENTRY_SAME(bdflush)
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/time.c linux-2.5/arch/parisc/kernel/time.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/time.c Wed Mar 5 12:08:02 2003
+++ linux-2.5/arch/parisc/kernel/time.c Mon May 5 15:34:24 2003
@@ -76,7 +76,7 @@
atomic_inc((atomic_t *)&prof_buffer[pc]);
}
-void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
long now;
long next_tick;
@@ -127,6 +127,8 @@
/* check soft power switch status */
if (cpu == 0 && !atomic_read(&power_tasklet.count))
tasklet_schedule(&power_tasklet);
+
+ return IRQ_HANDLED;
}
/*** converted from ia64 ***/
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/kernel/traps.c linux-2.5/arch/parisc/kernel/traps.c
--- ../.#prev/linux-2.5/arch/parisc/kernel/traps.c Mon Mar 24 18:58:50 2003
+++ linux-2.5/arch/parisc/kernel/traps.c Sun Jun 8 20:25:47 2003
@@ -114,6 +114,12 @@
printk("%s CPU: %8d CR30: " RFMT " CR31: " RFMT "\n",
level, current_thread_info()->cpu, cr30, cr31);
printk("%s ORIG_R28: " RFMT "\n", level, regs->orig_r28);
+ printk(level);
+ print_symbol(" IAOQ[0]: %s\n", regs->iaoq[0]);
+ printk(level);
+ print_symbol(" IAOQ[1]: %s\n", regs->iaoq[1]);
+ printk(level);
+ print_symbol(" RP(r2): %s\n", regs->gr[2]);
}
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/mm/init.c linux-2.5/arch/parisc/mm/init.c
--- ../.#prev/linux-2.5/arch/parisc/mm/init.c Tue May 27 06:58:33 2003
+++ linux-2.5/arch/parisc/mm/init.c Tue May 27 15:32:02 2003
@@ -10,6 +10,7 @@
#include <linux/config.h>
+#include <linux/module.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/delay.h>
@@ -666,6 +667,7 @@
PAGE_SIZE, PAGE_GATEWAY);
}
+#ifdef CONFIG_HPUX
void
map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm)
{
@@ -734,6 +736,8 @@
pg_table = (pte_t *) __va(pg_table) + start_pte;
set_pte(pg_table, __mk_pte(address, PAGE_GATEWAY));
}
+EXPORT_SYMBOL(map_hpux_gateway_page);
+#endif
extern void flush_tlb_all_local(void);
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/arch/parisc/oprofile/init.c linux-2.5/arch/parisc/oprofile/init.c
--- ../.#prev/linux-2.5/arch/parisc/oprofile/init.c Mon May 5 10:05:35 2003
+++ linux-2.5/arch/parisc/oprofile/init.c Thu May 8 07:31:44 2003
@@ -7,10 +7,11 @@
* @author John Levon <
[email protected]>
*/
+#include <linux/errno.h>
+#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/oprofile.h>
-#include <linux/init.h>
-
+
extern void timer_init(struct oprofile_operations ** ops);
int __init oprofile_arch_init(struct oprofile_operations ** ops)
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parisc/Kconfig linux-2.5/drivers/parisc/Kconfig
--- ../.#prev/linux-2.5/drivers/parisc/Kconfig Fri Jan 17 10:50:44 2003
+++ linux-2.5/drivers/parisc/Kconfig Sat Jun 14 18:39:40 2003
@@ -125,4 +125,27 @@
If unsure, say Y.
+config HOTPLUG
+ bool "Support for hot-pluggable devices"
+ ---help---
+ Say Y here if you want to plug devices into your computer while
+ the system is running, and be able to use them quickly. In many
+ cases, the devices can likewise be unplugged at any time too.
+
+ One well known example of this is PCMCIA- or PC-cards, credit-card
+ size devices such as network cards, modems or hard drives which are
+ plugged into slots found on all modern laptop computers. Another
+ example, used on modern desktops as well as laptops, is USB.
+
+ Enable HOTPLUG and KMOD, and build a modular kernel. Get agent
+ software (at <
http://linux-hotplug.sourceforge.net/>) and install it.
+ Then your kernel will automatically call out to a user mode "policy
+ agent" (/sbin/hotplug) to load modules and set up software needed
+ to use devices as you hotplug them.
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/pci/hotplug/Kconfig"
+
+
endmenu
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parisc/dino.c linux-2.5/drivers/parisc/dino.c
--- ../.#prev/linux-2.5/drivers/parisc/dino.c Wed Mar 5 12:09:28 2003
+++ linux-2.5/drivers/parisc/dino.c Wed May 28 08:36:13 2003
@@ -381,7 +381,7 @@
* ilr_loop counter is a kluge to prevent a "stuck" IRQ line from
* wedging the CPU. Could be removed or made optional at some point.
*/
-static void
+static irqreturn_t
dino_isr(int irq, void *intr_dev, struct pt_regs *regs)
{
struct dino_device *dino_dev = DINO_DEV(intr_dev);
@@ -441,7 +441,9 @@
if (--ilr_loop > 0)
goto ilr_again;
printk("Dino %lx: stuck interrupt %d\n", dino_dev->hba.base_addr, mask);
+ return IRQ_NONE;
}
+ return IRQ_HANDLED;
}
static int dino_choose_irq(struct parisc_device *dev)
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parisc/eisa.c linux-2.5/drivers/parisc/eisa.c
--- ../.#prev/linux-2.5/drivers/parisc/eisa.c Mon Feb 17 17:57:42 2003
+++ linux-2.5/drivers/parisc/eisa.c Sun Jun 1 02:25:29 2003
@@ -213,7 +213,7 @@
.action = action,
};
-static void eisa_irq(int _, void *intr_dev, struct pt_regs *regs)
+static irqreturn_t eisa_irq(int _, void *intr_dev, struct pt_regs *regs)
{
extern void do_irq(struct irqaction *a, int i, struct pt_regs *p);
int irq = gsc_readb(0xfc01f000); /* EISA supports 16 irqs */
@@ -262,11 +262,13 @@
eisa_out8(master_mask, 0x21);
}
spin_unlock_irqrestore(&eisa_irq_lock, flags);
+ return IRQ_HANDLED;
}
-static void dummy_irq2_handler(int _, void *dev, struct pt_regs *regs)
+static irqreturn_t dummy_irq2_handler(int _, void *dev, struct pt_regs *regs)
{
printk(KERN_ALERT "eisa: uhh, irq2?\n");
+ return IRQ_HANDLED;
}
static void init_eisa_pic(void)
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parisc/eisa_eeprom.c linux-2.5/drivers/parisc/eisa_eeprom.c
--- ../.#prev/linux-2.5/drivers/parisc/eisa_eeprom.c Tue Apr 8 07:38:06 2003
+++ linux-2.5/drivers/parisc/eisa_eeprom.c Mon May 5 15:34:24 2003
@@ -4,6 +4,7 @@
#include <linux/kernel.h>
#include <linux/miscdevice.h>
#include <linux/slab.h>
+#include <linux/fs.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/eisa_eeprom.h>
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parisc/gsc.c linux-2.5/drivers/parisc/gsc.c
--- ../.#prev/linux-2.5/drivers/parisc/gsc.c Tue Dec 24 15:18:12 2002
+++ linux-2.5/drivers/parisc/gsc.c Wed May 28 08:36:13 2003
@@ -79,7 +79,7 @@
#define GSC_MASK_IRQ(x) (1<<(GSC_FIX_IRQ(x)))
/* Common interrupt demultiplexer used by Asp, Lasi & Wax. */
-void busdev_barked(int busdev_irq, void *dev, struct pt_regs *regs)
+irqreturn_t busdev_barked(int busdev_irq, void *dev, struct pt_regs *regs)
{
unsigned long irq;
struct busdevice *busdev = (struct busdevice *) dev;
@@ -101,6 +101,7 @@
do_irq_mask(irq, busdev->busdev_region, regs);
}
+ return IRQ_HANDLED;
}
static void
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parisc/gsc.h linux-2.5/drivers/parisc/gsc.h
--- ../.#prev/linux-2.5/drivers/parisc/gsc.h Tue Jan 14 06:08:36 2003
+++ linux-2.5/drivers/parisc/gsc.h Wed May 28 08:36:13 2003
@@ -43,4 +43,4 @@
extern int gsc_alloc_irq(struct gsc_irq *dev); /* dev needs an irq */
extern int gsc_claim_irq(struct gsc_irq *dev, int irq); /* dev needs this irq */
-void busdev_barked(int busdev_irq, void *dev, struct pt_regs *regs);
+irqreturn_t busdev_barked(int busdev_irq, void *dev, struct pt_regs *regs);
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parisc/iosapic.c linux-2.5/drivers/parisc/iosapic.c
--- ../.#prev/linux-2.5/drivers/parisc/iosapic.c Tue Jan 14 06:08:36 2003
+++ linux-2.5/drivers/parisc/iosapic.c Sun Jun 1 02:25:29 2003
@@ -605,7 +605,7 @@
}
-static void
+static irqreturn_t
iosapic_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
struct vector_info *vi = (struct vector_info *)dev_id;
@@ -623,6 +623,8 @@
** I/O SAPIC must always issue EOI.
*/
IOSAPIC_EOI(vi->vi_eoi_addr, vi->vi_eoi_data);
+
+ return IRQ_HANDLED;
}
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parisc/led.c linux-2.5/drivers/parisc/led.c
--- ../.#prev/linux-2.5/drivers/parisc/led.c Tue May 27 07:00:44 2003
+++ linux-2.5/drivers/parisc/led.c Tue Jun 3 18:45:51 2003
@@ -3,7 +3,7 @@
*
* (c) Copyright 2000 Red Hat Software
* (c) Copyright 2000 Helge Deller <
[email protected]>
- * (c) Copyright 2001-2002 Helge Deller <
[email protected]>
+ * (c) Copyright 2001-2003 Helge Deller <
[email protected]>
* (c) Copyright 2001 Randolph Chung <
[email protected]>
*
* This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
*
* TODO:
* - speed-up calculations with inlined assembler
- * - interface to write to second row of LCD from /proc
+ * - interface to write to second row of LCD from /proc (if technically possible)
*/
#include <linux/config.h>
@@ -22,10 +22,11 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/ioport.h>
-#include <linux/bitops.h>
#include <linux/version.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
+#include <linux/inetdevice.h>
+#include <linux/in.h>
#include <linux/interrupt.h>
#include <linux/kernel_stat.h>
#include <linux/reboot.h>
@@ -59,10 +60,6 @@
#endif
-#define CALC_ADD(val, comp, add) \
- (val<=(comp/8) ? add/16 : val<=(comp/4) ? add/8 : val<=(comp/2) ? add/4 : add)
-
-
struct lcd_block {
unsigned char command; /* stores the command byte */
unsigned char on; /* value for turning LED on */
@@ -341,93 +338,81 @@
/*
**
- ** led_get_net_stats()
+ ** led_get_net_activity()
**
- ** calculate the TX- & RX-troughput on the network interfaces in
- ** the system for usage in the LED code
- **
+ ** calculate if there was TX- or RX-troughput on the network interfaces
** (analog to dev_get_info() from net/core/dev.c)
**
*/
-static unsigned long led_net_rx_counter, led_net_tx_counter;
-
-static void led_get_net_stats(int addvalue)
+static __inline__ int led_get_net_activity(void)
{
-#ifdef CONFIG_NET
+#ifndef CONFIG_NET
+ return 0;
+#else
static unsigned long rx_total_last, tx_total_last;
unsigned long rx_total, tx_total;
struct net_device *dev;
- struct net_device_stats *stats;
+ int retval;
rx_total = tx_total = 0;
- /* we are running as a tasklet, so locking dev_base
+ /* we are running as tasklet, so locking dev_base
* for reading should be OK */
read_lock(&dev_base_lock);
- for (dev = dev_base; dev != NULL; dev = dev->next) {
- if (dev->get_stats) {
- stats = dev->get_stats(dev);
- rx_total += stats->rx_packets;
- tx_total += stats->tx_packets;
- }
+ for (dev = dev_base; dev; dev = dev->next) {
+ struct net_device_stats *stats;
+ struct in_device *in_dev = __in_dev_get(dev);
+ if (!in_dev || !in_dev->ifa_list)
+ continue;
+ if (LOOPBACK(in_dev->ifa_list->ifa_local))
+ continue;
+ if (!dev->get_stats)
+ continue;
+ stats = dev->get_stats(dev);
+ rx_total += stats->rx_packets;
+ tx_total += stats->tx_packets;
}
read_unlock(&dev_base_lock);
- rx_total -= rx_total_last;
- tx_total -= tx_total_last;
-
- if (rx_total)
- led_net_rx_counter += CALC_ADD(rx_total, tx_total, addvalue);
+ retval = 0;
+
+ if (rx_total != rx_total_last) {
+ rx_total_last = rx_total;
+ retval |= LED_LAN_RCV;
+ }
+
+ if (tx_total != tx_total_last) {
+ tx_total_last = tx_total;
+ retval |= LED_LAN_TX;
+ }
- if (tx_total)
- led_net_tx_counter += CALC_ADD(tx_total, rx_total, addvalue);
-
- rx_total_last += rx_total;
- tx_total_last += tx_total;
+ return retval;
#endif
}
/*
**
- ** led_get_diskio_stats()
+ ** led_get_diskio_activity()
**
- ** calculate the disk-io througput in the system
- ** (analog to linux/fs/proc/proc_misc.c)
+ ** calculate if there was disk-io in the system
**
*/
-static unsigned long led_diskio_counter;
-
-static void led_get_diskio_stats(int addvalue)
+static __inline__ int led_get_diskio_activity(void)
{
- static unsigned int diskio_total_last, diskio_max;
- int major, disk, total;
+ static unsigned long last_pgpgin, last_pgpgout;
+ struct page_state pgstat;
+ int changed;
- total = 0;
-#if 0
- /*
- * this section will no longer work in 2.5, as we no longer
- * have either kstat.dk_drive nor DK_MAX_*. It can probably
- * be rewritten to use the per-disk statistics now kept in the
- * gendisk, but since I have no HP machines to test it on, I'm
- * not really up to that.
[email protected] 11/7/02
- */
- for (major = 0; major < DK_MAX_MAJOR; major++) {
- for (disk = 0; disk < DK_MAX_DISK; disk++)
- total += dkstat.drive[major][disk];
- }
- total -= diskio_total_last;
-
- if (total) {
- if (total >= diskio_max) {
- led_diskio_counter += addvalue;
- diskio_max = total; /* new maximum value found */
- } else
- led_diskio_counter += CALC_ADD(total, diskio_max, addvalue);
- }
-#endif
+ get_full_page_state(&pgstat); /* get no of sectors in & out */
+
+ /* Just use a very simple calculation here. Do not care about overflow,
+ since we only want to know if there was activity or not. */
+ changed = (pgstat.pgpgin != last_pgpgin) || (pgstat.pgpgout != last_pgpgout);
+ last_pgpgin = pgstat.pgpgin;
+ last_pgpgout = pgstat.pgpgout;
- diskio_total_last += total;
+ return (changed ? LED_DISK_IO : 0);
}
@@ -443,16 +428,23 @@
- optimizations
*/
-static unsigned char currentleds; /* stores current value of the LEDs */
-
#define HEARTBEAT_LEN (HZ*6/100)
#define HEARTBEAT_2ND_RANGE_START (HZ*22/100)
#define HEARTBEAT_2ND_RANGE_END (HEARTBEAT_2ND_RANGE_START + HEARTBEAT_LEN)
+#if HZ==100
+ #define NORMALIZED_COUNT(count) (count)
+#else
+ #warning "Untested situation HZ != 100 !!"
+ #define NORMALIZED_COUNT(count) (count/(HZ/100))
+#endif
+
static void led_tasklet_func(unsigned long unused)
{
- static unsigned int count, count_HZ;
static unsigned char lastleds;
+ unsigned char currentleds; /* stores current value of the LEDs */
+ static unsigned long count; /* static incremented value, not wrapped */
+ static unsigned long count_HZ; /* counter in range 0..HZ */
/* exit if not initialized */
if (!led_func_ptr)
@@ -463,6 +455,8 @@
if (++count_HZ == HZ)
count_HZ = 0;
+ currentleds = lastleds;
+
if (led_heartbeat)
{
/* flash heartbeat-LED like a real heart (2 x short then a long delay) */
@@ -473,42 +467,25 @@
currentleds &= ~LED_HEARTBEAT;
}
- /* gather network and diskio statistics and flash LEDs respectively */
-
- if (led_lanrxtx)
+ /* look for network activity and flash LEDs respectively */
+ if (led_lanrxtx && ((NORMALIZED_COUNT(count)+(8/2)) & 7) == 0)
{
- if ((count & 31) == 0)
- led_get_net_stats(30);
-
- if (led_net_rx_counter) {
- led_net_rx_counter--;
- currentleds |= LED_LAN_RCV;
- }
- else
- currentleds &= ~LED_LAN_RCV;
-
- if (led_net_tx_counter) {
- led_net_tx_counter--;
- currentleds |= LED_LAN_TX;
- }
- else
- currentleds &= ~LED_LAN_TX;
+ currentleds &= ~(LED_LAN_RCV | LED_LAN_TX);
+ currentleds |= led_get_net_activity();
}
- if (led_diskio)
+ /* avoid to calculate diskio-stats at same irq as netio-stats */
+ if (led_diskio && (NORMALIZED_COUNT(count) & 7) == 0)
{
- /* avoid to calculate diskio-stats at same irq as netio-stats ! */
- if ((count & 31) == 15)
- led_get_diskio_stats(30);
-
- if (led_diskio_counter) {
- led_diskio_counter--;
- currentleds |= LED_DISK_IO;
- }
- else
- currentleds &= ~LED_DISK_IO;
+ currentleds &= ~LED_DISK_IO;
+ currentleds |= led_get_diskio_activity();
}
+ /* blink all LEDs twice a second if we got an Oops (HPMC) */
+ if (oops_in_progress) {
+ currentleds = (count_HZ<=(HZ/2)) ? 0 : 0xff;
+ }
+
/* update the LCD/LEDs */
if (currentleds != lastleds) {
led_func_ptr(currentleds);
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parisc/superio.c linux-2.5/drivers/parisc/superio.c
--- ../.#prev/linux-2.5/drivers/parisc/superio.c Tue Jan 14 06:08:36 2003
+++ linux-2.5/drivers/parisc/superio.c Sun Jun 1 02:25:29 2003
@@ -90,7 +90,7 @@
sio_dev.iosapic_irq = irq;
}
-static void
+static irqreturn_t
superio_interrupt(int irq, void *devp, struct pt_regs *regs)
{
struct superio_device *sio = (struct superio_device *)devp;
@@ -107,7 +107,7 @@
/* HACK: need to investigate why this happens if SMP enabled */
BUG(); /* This shouldn't happen */
#endif
- return;
+ return IRQ_HANDLED;
}
/* Check to see which device is interrupting */
@@ -117,7 +117,7 @@
if (local_irq == 2 || local_irq > 7) {
printk(KERN_ERR "SuperIO: slave interrupted!\n");
BUG();
- return;
+ return IRQ_HANDLED;
}
if (local_irq == 7) {
@@ -128,7 +128,7 @@
results = inb(IC_PIC1+0);
if ((results & 0x80) == 0) { /* if ISR7 not set: spurious */
printk(KERN_WARNING "SuperIO: spurious interrupt!\n");
- return;
+ return IRQ_HANDLED;
}
}
@@ -141,7 +141,7 @@
/* set EOI */
outb((OCW2_SEOI|local_irq),IC_PIC1 + 0);
- return;
+ return IRQ_HANDLED;
}
/* Initialize Super I/O device */
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/parport/parport_gsc.c linux-2.5/drivers/parport/parport_gsc.c
--- ../.#prev/linux-2.5/drivers/parport/parport_gsc.c Mon Mar 24 19:00:05 2003
+++ linux-2.5/drivers/parport/parport_gsc.c Sun Jun 1 02:25:29 2003
@@ -81,9 +81,10 @@
* of these are in parport_gsc.h.
*/
-static void parport_gsc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t parport_gsc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
parport_generic_irq(irq, (struct parport *) dev_id, regs);
+ return IRQ_HANDLED;
}
void parport_gsc_write_data(struct parport *p, unsigned char d)
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/video/console/sticore.c linux-2.5/drivers/video/console/sticore.c
--- ../.#prev/linux-2.5/drivers/video/console/sticore.c Tue May 27 07:01:44 2003
+++ linux-2.5/drivers/video/console/sticore.c Sun Jun 1 06:26:17 2003
@@ -1076,3 +1076,9 @@
return sti_roms[index-1];
}
+EXPORT_SYMBOL(sti_get_rom);
+
+MODULE_AUTHOR("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer");
+MODULE_DESCRIPTION("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines");
+MODULE_LICENSE("GPL v2");
+
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/drivers/video/stifb.c linux-2.5/drivers/video/stifb.c
--- ../.#prev/linux-2.5/drivers/video/stifb.c Tue May 27 07:01:42 2003
+++ linux-2.5/drivers/video/stifb.c Sun Jun 1 06:26:17 2003
@@ -66,6 +66,7 @@
#include <linux/pci.h>
#include <asm/grfioctl.h> /* for HP-UX compatibility */
+#include <asm/uaccess.h>
#include "sticore.h"
@@ -111,6 +112,7 @@
int deviceSpecificConfig;
};
+static int __initdata bpp = 8; /* parameter from modprobe */
static int __initdata stifb_force_bpp[MAX_STI_ROMS];
/* ------------------- chipset specific functions -------------------------- */
@@ -1336,6 +1338,8 @@
sti = sti_get_rom(i);
if (!sti)
break;
+ if (bpp > 0)
+ stifb_force_bpp[i] = bpp;
stifb_init_fb(sti, stifb_force_bpp[i]);
}
return 0;
@@ -1355,8 +1359,14 @@
sti = sti_get_rom(i);
if (!sti)
break;
- if (sti->info)
+ if (sti->info) {
+ struct fb_info *info = sti->info;
unregister_framebuffer(sti->info);
+ release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
+ release_mem_region(info->fix.smem_start, info->fix.smem_len);
+ fb_dealloc_cmap(&info->cmap);
+ kfree(info);
+ }
sti->info = NULL;
}
}
@@ -1372,9 +1382,10 @@
if (strncmp(options, "bpp", 3) == 0) {
options += 3;
for (i = 0; i < MAX_STI_ROMS; i++) {
- if (*options++ == ':')
+ if (*options++ == ':') {
stifb_force_bpp[i] = simple_strtoul(options, &options, 10);
- else
+ bpp = -1;
+ } else
break;
}
}
@@ -1390,7 +1401,7 @@
MODULE_AUTHOR("Helge Deller <
[email protected]>, Thomas Bogendoerfer <
[email protected]>");
MODULE_DESCRIPTION("Framebuffer driver for HP's NGLE series graphics cards in HP PARISC machines");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
MODULE_PARM(bpp, "i");
MODULE_PARM_DESC(mem, "Bits per pixel (default: 8)");
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/include/asm-parisc/compat.h linux-2.5/include/asm-parisc/compat.h
--- ../.#prev/linux-2.5/include/asm-parisc/compat.h Wed Apr 23 15:51:19 2003
+++ linux-2.5/include/asm-parisc/compat.h Thu May 29 00:45:08 2003
@@ -4,6 +4,7 @@
* Architecture specific compatibility types
*/
#include <linux/types.h>
+#include <linux/sched.h>
#define COMPAT_USER_HZ 100
@@ -122,6 +123,14 @@
static inline void *compat_ptr(compat_uptr_t uptr)
{
return (void *)(unsigned long)uptr;
+}
+
+static __inline__ void *compat_alloc_user_space(long len)
+{
+ struct pt_regs *regs = ¤t->thread.regs;
+ unsigned long usp = regs->gr[30];
+
+ return (void *)(usp + len);
}
#endif /* _ASM_PARISC_COMPAT_H */
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/include/asm-parisc/elf.h linux-2.5/include/asm-parisc/elf.h
--- ../.#prev/linux-2.5/include/asm-parisc/elf.h Tue May 27 07:02:37 2003
+++ linux-2.5/include/asm-parisc/elf.h Tue May 27 11:28:21 2003
@@ -178,10 +178,11 @@
#define PF_HP_SBP 0x08000000
/*
- * The following definitions are those for 32-bit ELF binaries on a 32-bit kernel
- * and for 64-bit binaries on a 64-bit kernel. To run 32-bit binaries on a 64-bit
- * kernel, arch/parisc64/kernel/binfmt_elf32.c defines these macros appropriately
- * and then #includes binfmt_elf.c, which then includes this file.
+ * The following definitions are those for 32-bit ELF binaries on a 32-bit
+ * kernel and for 64-bit binaries on a 64-bit kernel. To run 32-bit binaries
+ * on a 64-bit kernel, arch/parisc64/kernel/binfmt_elf32.c defines these
+ * macros appropriately and then #includes binfmt_elf.c, which then includes
+ * this file.
*/
#ifndef ELF_CLASS
@@ -266,6 +267,8 @@
#define ELF_NFPREG 32
typedef double elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+struct task_struct;
extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/include/asm-parisc/fixmap.h linux-2.5/include/asm-parisc/fixmap.h
--- ../.#prev/linux-2.5/include/asm-parisc/fixmap.h Thu Oct 31 10:28:21 2002
+++ linux-2.5/include/asm-parisc/fixmap.h Mon May 5 15:34:24 2003
@@ -4,9 +4,16 @@
/*
* Allocate a 8 Mb temporary mapping area for copy_user_page/clear_user_page.
* This area needs to be aligned on a 8 Mb boundary.
+ *
+ * FIXME:
+ *
+ * For PA-RISC, this has no meaning. It is starting to be used on x86
+ * for vsyscalls. PA will probably do this using space registers.
*/
+/* This TMPALIAS_MAP_START reserves some of the memory where the
+ * FIXMAP region is on x86. It's only real use is to constrain
+ * VMALLOC_END (see pktable.h) */
#define TMPALIAS_MAP_START (__PAGE_OFFSET - 0x01000000)
-#define FIXADDR_START ((unsigned long)TMPALIAS_MAP_START)
#endif
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/include/asm-parisc/module.h linux-2.5/include/asm-parisc/module.h
--- ../.#prev/linux-2.5/include/asm-parisc/module.h Mon Feb 10 13:43:24 2003
+++ linux-2.5/include/asm-parisc/module.h Tue Jun 10 19:43:50 2003
@@ -24,10 +24,10 @@
struct mod_arch_specific
{
- unsigned long got_offset;
- unsigned long fdesc_offset, fdesc_count;
- unsigned long stub_offset;
- unsigned long stub_count;
+ unsigned long got_offset, got_count, got_max;
+ unsigned long fdesc_offset, fdesc_count, fdesc_max;
+ unsigned long stub_offset, stub_count, stub_max;
+ unsigned long init_stub_offset, init_stub_count, init_stub_max;
};
#endif /* _ASM_PARISC_MODULE_H */
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/include/asm-parisc/pdc_chassis.h linux-2.5/include/asm-parisc/pdc_chassis.h
--- ../.#prev/linux-2.5/include/asm-parisc/pdc_chassis.h Wed Mar 5 12:10:50 2003
+++ linux-2.5/include/asm-parisc/pdc_chassis.h Tue May 27 14:57:25 2003
@@ -35,7 +35,7 @@
*/
int pdc_chassis_send_status(int message);
-void __init parisc_pdc_chassis_init(void);
+void parisc_pdc_chassis_init(void);
/*
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/include/asm-parisc/pgtable.h linux-2.5/include/asm-parisc/pgtable.h
--- ../.#prev/linux-2.5/include/asm-parisc/pgtable.h Mon Mar 17 16:14:10 2003
+++ linux-2.5/include/asm-parisc/pgtable.h Mon May 5 15:34:24 2003
@@ -109,7 +109,8 @@
#define PCXL_DMA_MAP_SIZE (8*1024*1024)
#define VMALLOC_START ((unsigned long)vmalloc_start)
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
-#define VMALLOC_END (FIXADDR_START)
+/* this is a fixmap remnant, see fixmap.h */
+#define VMALLOC_END (TMPALIAS_MAP_START)
#endif
/* NB: The tlb miss handlers make certain assumptions about the order */
@@ -122,6 +123,7 @@
#define _PAGE_GATEWAY_BIT 28 /* (0x008) privilege promotion allowed */
#define _PAGE_DMB_BIT 27 /* (0x010) Data Memory Break enable (B bit) */
#define _PAGE_DIRTY_BIT 26 /* (0x020) Page Dirty (D bit) */
+#define _PAGE_FILE_BIT _PAGE_DIRTY_BIT /* overload this bit */
#define _PAGE_REFTRAP_BIT 25 /* (0x040) Page Ref. Trap enable (T bit) */
#define _PAGE_NO_CACHE_BIT 24 /* (0x080) Uncached Page (U bit) */
#define _PAGE_ACCESSED_BIT 23 /* (0x100) Software: Page Accessed */
@@ -135,6 +137,17 @@
#define xlate_pabit(x) (31 - x)
+/* this defines the shift to the usable bits in the PTE it is set so
+ * that the valid bits _PAGE_PRESENT_BIT and _PAGE_USER_BIT are set
+ * to zero */
+#define PTE_SHIFT xlate_pabit(_PAGE_USER_BIT)
+
+/* this is how many bits may be used by the file functions */
+#define PTE_FILE_MAX_BITS (BITS_PER_LONG - PTE_SHIFT)
+
+#define pte_to_pgoff(pte) (pte_val(pte) >> PTE_SHIFT)
+#define pgoff_to_pte(off) ((pte_t) { ((off) << PTE_SHIFT) | _PAGE_FILE })
+
#define _PAGE_READ (1 << xlate_pabit(_PAGE_READ_BIT))
#define _PAGE_WRITE (1 << xlate_pabit(_PAGE_WRITE_BIT))
#define _PAGE_RW (_PAGE_READ | _PAGE_WRITE)
@@ -148,6 +161,7 @@
#define _PAGE_PRESENT (1 << xlate_pabit(_PAGE_PRESENT_BIT))
#define _PAGE_FLUSH (1 << xlate_pabit(_PAGE_FLUSH_BIT))
#define _PAGE_USER (1 << xlate_pabit(_PAGE_USER_BIT))
+#define _PAGE_FILE (1 << xlate_pabit(_PAGE_FILE_BIT))
#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | _PAGE_DIRTY | _PAGE_ACCESSED)
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
@@ -256,6 +270,8 @@
extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
+extern inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; }
+extern inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
extern inline pte_t pte_rdprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_READ; return pte; }
extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/include/asm-parisc/processor.h linux-2.5/include/asm-parisc/processor.h
--- ../.#prev/linux-2.5/include/asm-parisc/processor.h Mon Mar 17 16:14:10 2003
+++ linux-2.5/include/asm-parisc/processor.h Sun Mar 23 13:14:52 2003
@@ -92,6 +92,7 @@
unsigned long fp_model;
unsigned int state;
struct parisc_device *dev;
+ unsigned long loops_per_jiffy;
};
extern struct system_cpuinfo_parisc boot_cpu_data;
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/include/asm-parisc/timex.h linux-2.5/include/asm-parisc/timex.h
--- ../.#prev/linux-2.5/include/asm-parisc/timex.h Thu Oct 31 10:28:22 2002
+++ linux-2.5/include/asm-parisc/timex.h Mon May 5 15:34:24 2003
@@ -7,7 +7,6 @@
#define _ASMPARISC_TIMEX_H
#include <asm/system.h>
-#include <linux/time.h>
#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
diff -urN --exclude-from=/tmp/dont8327.10459 ../.#prev/linux-2.5/include/asm-parisc/unistd.h linux-2.5/include/asm-parisc/unistd.h
--- ../.#prev/linux-2.5/include/asm-parisc/unistd.h Mon Mar 24 19:02:10 2003
+++ linux-2.5/include/asm-parisc/unistd.h Tue May 20 15:35:19 2003
@@ -720,6 +720,7 @@
#define __NR_epoll_ctl (__NR_Linux + 225)
#define __NR_epoll_wait (__NR_Linux + 226)
#define __NR_remap_file_pages (__NR_Linux + 227)
+#define __NR_semtimedop (__NR_Linux + 228)
#define __NR_Linux_syscalls 228