summaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-05 06:47:02 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-05 06:47:02 +0000
commit99a7e12f34b3661a0d1354eef83a0eef4df5e34c (patch)
tree3560aca9ca86792f9ab7bd87861ea143a1b3c7a3 /arch/alpha
parente73a04659c0b8cdee4dd40e58630e2cf63afb316 (diff)
Merge with Linux 2.3.38.
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/Makefile22
-rw-r--r--arch/alpha/boot/Makefile4
-rw-r--r--arch/alpha/kernel/alpha_ksyms.c6
-rw-r--r--arch/alpha/kernel/core_irongate.c1
-rw-r--r--arch/alpha/kernel/core_mcpcia.c31
-rw-r--r--arch/alpha/kernel/entry.S10
-rw-r--r--arch/alpha/kernel/head.S18
-rw-r--r--arch/alpha/kernel/osf_sys.c182
-rw-r--r--arch/alpha/kernel/pci.c21
-rw-r--r--arch/alpha/kernel/sys_nautilus.c43
-rw-r--r--arch/alpha/kernel/sys_sio.c2
-rw-r--r--arch/alpha/lib/Makefile8
-rw-r--r--arch/alpha/mm/init.c1
13 files changed, 213 insertions, 136 deletions
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile
index 28ba0dd51..36f4d4e6d 100644
--- a/arch/alpha/Makefile
+++ b/arch/alpha/Makefile
@@ -29,23 +29,32 @@ ifeq ($(have_mcpu),y)
# the host compiler might have on by default. Given that EV4 and EV5
# have the same instruction set, prefer EV5 because an EV5 schedule is
# more likely to keep an EV4 processor busy than vice-versa.
+ mcpu_done := n
ifeq ($(CONFIG_ALPHA_GENERIC),y)
CFLAGS := $(CFLAGS) -mcpu=ev5
+ mcpu_done := y
endif
- ifeq ($(CONFIG_ALPHA_EV4),y)
- CFLAGS := $(CFLAGS) -mcpu=ev4
- endif
- ifeq ($(CONFIG_ALPHA_PYXIS),y)
+ ifeq ($(mcpu_done)$(CONFIG_ALPHA_PYXIS),ny)
CFLAGS := $(CFLAGS) -mcpu=ev56
+ mcpu_done := y
endif
- ifeq ($(CONFIG_ALPHA_POLARIS),y)
+ ifeq ($(mcpu_done)$(CONFIG_ALPHA_POLARIS),ny)
ifeq ($(have_mcpu_pca56),y)
CFLAGS := $(CFLAGS) -mcpu=pca56
else
CFLAGS := $(CFLAGS) -mcpu=ev56
endif
+ mcpu_done := y
+ endif
+ ifeq ($(mcpu_done)$(CONFIG_ALPHA_NAUTILUS)$(have_mcpu_ev67),nyy)
+ CFLAGS := $(CFLAGS) -mcpu=ev67
+ mcpu_done := y
+ endif
+ ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV4),ny)
+ CFLAGS := $(CFLAGS) -mcpu=ev4
+ mcpu_done := y
endif
- ifeq ($(CONFIG_ALPHA_EV6),y)
+ ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV6),ny)
ifeq ($(have_mcpu_ev6),y)
CFLAGS := $(CFLAGS) -mcpu=ev6
else
@@ -55,6 +64,7 @@ ifeq ($(have_mcpu),y)
CFLAGS := $(CFLAGS) -mcpu=ev56
endif
endif
+ mcpu_done := y
endif
endif
diff --git a/arch/alpha/boot/Makefile b/arch/alpha/boot/Makefile
index ee3460463..ee2ac0ac0 100644
--- a/arch/alpha/boot/Makefile
+++ b/arch/alpha/boot/Makefile
@@ -11,9 +11,9 @@
LINKFLAGS = -static -T bootloader.lds #-N -relax
.S.s:
- $(CC) -D__ASSEMBLY__ -traditional -E -o $*.o $<
+ $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -E -o $*.o $<
.S.o:
- $(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $<
+ $(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c -o $*.o $<
OBJECTS = head.o main.o
BPOBJECTS = head.o bootp.o
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c
index ef8be067c..877926974 100644
--- a/arch/alpha/kernel/alpha_ksyms.c
+++ b/arch/alpha/kernel/alpha_ksyms.c
@@ -36,7 +36,6 @@
extern struct hwrpb_struct *hwrpb;
extern void dump_thread(struct pt_regs *, struct user *);
extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
-extern void ___delay(void);
/* these are C runtime functions with special calling conventions: */
extern void __divl (void);
@@ -151,11 +150,6 @@ EXPORT_SYMBOL_NOVERS(__down_failed);
EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
EXPORT_SYMBOL_NOVERS(__up_wakeup);
-/*
- * This is called specially from __delay.
- */
-EXPORT_SYMBOL_NOVERS(___delay);
-
/*
* SMP-specific symbols.
*/
diff --git a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c
index ef686277c..81615dbdf 100644
--- a/arch/alpha/kernel/core_irongate.c
+++ b/arch/alpha/kernel/core_irongate.c
@@ -338,6 +338,7 @@ irongate_init_arch(void)
{
struct pci_controler *hose;
+ IRONGATE0->stat_cmd = IRONGATE0->stat_cmd & ~0x100;
irongate_pci_clr_err();
irongate_register_dump(__FUNCTION__);
diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c
index b4fe28849..4b165940d 100644
--- a/arch/alpha/kernel/core_mcpcia.c
+++ b/arch/alpha/kernel/core_mcpcia.c
@@ -306,7 +306,7 @@ mcpcia_probe_hose(int h)
mb();
draina();
wrmces(7);
- mcheck_expected(cpu) = 1;
+ mcheck_expected(cpu) = 2; /* indicates probing */
mcheck_taken(cpu) = 0;
mcheck_extra(cpu) = mid;
mb();
@@ -415,7 +415,7 @@ mcpcia_startup_hose(struct pci_controler *hose)
#if 0
tmp = *(vuip)MCPCIA_INT_CTL(mid);
- printk("mcpcia_init_arch: INT_CTL was 0x%x\n", tmp);
+ printk("mcpcia_startup_hose: INT_CTL was 0x%x\n", tmp);
*(vuip)MCPCIA_INT_CTL(mid) = 1U;
mb();
tmp = *(vuip)MCPCIA_INT_CTL(mid);
@@ -548,30 +548,37 @@ mcpcia_machine_check(unsigned long vector, unsigned long la_ptr,
struct el_common *mchk_header;
struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout;
unsigned int cpu = smp_processor_id();
+ int expected;
mchk_header = (struct el_common *)la_ptr;
mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr;
+ expected = mcheck_expected(cpu);
mb();
mb(); /* magic */
draina();
- if (mcheck_expected(cpu)) {
- mcpcia_pci_clr_err(mcheck_extra(cpu));
- } else {
+
+ switch (expected) {
+ case 0:
/* FIXME: how do we figure out which hose the
error was on? */
struct pci_controler *hose;
for (hose = hose_head; hose; hose = hose->next)
mcpcia_pci_clr_err(hose2mid(hose->index));
+ break;
+ case 1:
+ mcpcia_pci_clr_err(mcheck_extra(cpu));
+ break;
+ default:
+ /* Otherwise, we're being called from mcpcia_probe_hose
+ and there's no hose clear an error from. */
+ break;
}
+
wrmces(0x7);
mb();
- if (mcheck_expected(cpu)) {
- process_mcheck_info(vector, la_ptr, regs, "MCPCIA", 1);
- } else {
- process_mcheck_info(vector, la_ptr, regs, "MCPCIA", 0);
- if (vector != 0x620 && vector != 0x630)
- mcpcia_print_uncorrectable(mchk_logout);
- }
+ process_mcheck_info(vector, la_ptr, regs, "MCPCIA", expected != 0);
+ if (!expected && vector != 0x620 && vector != 0x630)
+ mcpcia_print_uncorrectable(mchk_logout);
}
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index 1e34d5a33..6b37bd23c 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -8,7 +8,7 @@
#define SIGCHLD 20
-#define NR_SYSCALLS 373
+#define NR_SYSCALLS 374
/*
* These offsets must match with alpha_mv in <asm/machvec.h>.
@@ -84,8 +84,8 @@
ldq $1,8($30); \
ldq $2,16($30); \
ldq $3,24($30); \
- ldq $20,152($30); \
- ldq $21,HAE_CACHE($19); \
+ ldq $21,152($30); \
+ ldq $20,HAE_CACHE($19); \
ldq $4,32($30); \
ldq $5,40($30); \
ldq $6,48($30); \
@@ -985,7 +985,7 @@ sys_call_table:
.quad osf_utsname
.quad sys_lchown
.quad osf_shmat
- .quad sys_shmctl /* 210 */
+ .quad sys_shmctlold /* 210 */
.quad sys_shmdt
.quad sys_shmget
.quad alpha_ni_syscall
@@ -1149,3 +1149,5 @@ sys_call_table:
.quad sys_sendfile /* 370 */
.quad sys_setresgid
.quad sys_getresgid
+ .quad sys_ni_syscall /* sys_dipc */
+ .quad sys_shmctl
diff --git a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S
index e410e2684..3b004b7f6 100644
--- a/arch/alpha/kernel/head.S
+++ b/arch/alpha/kernel/head.S
@@ -95,21 +95,3 @@ halt:
.prologue 0
call_pal PAL_halt
.end halt
-
- #
- # Having the delay loop out of line guarantees that we wont
- # run into weird alignment conditions (on new processors)
- # that vary the speed of the loop.
- #
- .align 5
- .globl ___delay
- .ent ___delay
-___delay:
- .set noat
- .frame $30,0,$28,0
- .prologue 0
-1: subq $0,1,$0
- bge $0,1b
- ret $31,($28),0
- .set at
- .end ___delay
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index e888c91e3..e81687bdb 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -31,6 +31,8 @@
#include <linux/shm.h>
#include <linux/poll.h>
#include <linux/file.h>
+#include <linux/types.h>
+#include <linux/ipc.h>
#include <asm/fpu.h>
#include <asm/io.h>
@@ -38,16 +40,11 @@
#include <asm/system.h>
#include <asm/sysinfo.h>
#include <asm/hwrpb.h>
+#include <asm/processor.h>
-extern int do_mount(kdev_t, const char *, const char *, char *, int, void *);
+extern int do_mount(struct block_device *, const char *, const char *, char *, int, void *);
extern int do_pipe(int *);
-extern struct file_operations *get_blkfops(unsigned int);
-extern struct file_operations *get_chrfops(unsigned int);
-
-extern kdev_t get_unnamed_dev(void);
-extern void put_unnamed_dev(kdev_t);
-
extern asmlinkage int sys_swapon(const char *specialfile, int swap_flags);
extern asmlinkage unsigned long sys_brk(unsigned long);
@@ -396,18 +393,16 @@ struct procfs_args {
uid_t exroot;
};
-static int getdev(const char *name, int rdonly, struct dentry **dp)
+static struct dentry *getdev(const char *name, int rdonly)
{
- kdev_t dev;
struct dentry *dentry;
struct inode *inode;
- struct file_operations *fops;
int retval;
dentry = namei(name);
retval = PTR_ERR(dentry);
if (IS_ERR(dentry))
- return retval;
+ return dentry;
retval = -ENOTBLK;
inode = dentry->d_inode;
@@ -417,48 +412,20 @@ static int getdev(const char *name, int rdonly, struct dentry **dp)
retval = -EACCES;
if (IS_NODEV(inode))
goto out_dput;
-
- retval = -ENXIO;
- dev = inode->i_rdev;
- if (MAJOR(dev) >= MAX_BLKDEV)
- goto out_dput;
-
- retval = -ENODEV;
- fops = get_blkfops(MAJOR(dev));
- if (!fops)
- goto out_dput;
- if (fops->open) {
- struct file dummy;
- memset(&dummy, 0, sizeof(dummy));
- dummy.f_dentry = dentry;
- dummy.f_mode = rdonly ? 1 : 3;
- retval = fops->open(inode, &dummy);
- if (retval)
- goto out_dput;
- }
- *dp = dentry;
- retval = 0;
-out:
- return retval;
+ return dentry;
out_dput:
dput(dentry);
- goto out;
-}
-
-static void putdev(struct dentry *dentry)
-{
- struct file_operations *fops;
-
- fops = get_blkfops(MAJOR(dentry->d_inode->i_rdev));
- if (fops->release)
- fops->release(dentry->d_inode, NULL);
+ return ERR_PTR(retval);
}
/*
* We can't actually handle ufs yet, so we translate UFS mounts to
* ext2fs mounts. I wouldn't mind a UFS filesystem, but the UFS
* layout is so braindead it's a major headache doing it.
+ *
+ * Just how long ago was it written? OTOH our UFS driver may be still
+ * unhappy with OSF UFS. [CHECKME]
*/
static int osf_ufs_mount(char *dirname, struct ufs_args *args, int flags)
{
@@ -470,13 +437,12 @@ static int osf_ufs_mount(char *dirname, struct ufs_args *args, int flags)
if (copy_from_user(&tmp, args, sizeof(tmp)))
goto out;
- retval = getdev(tmp.devname, 0, &dentry);
- if (retval)
+ dentry = getdev(tmp.devname, 0);
+ retval = PTR_ERR(dentry);
+ if (IS_ERR(dentry)
goto out;
- retval = do_mount(dentry->d_inode->i_rdev, tmp.devname, dirname,
+ retval = do_mount(dentry->d_inode->i_bdev, tmp.devname, dirname,
"ext2", flags, NULL);
- if (retval)
- putdev(dentry);
dput(dentry);
out:
return retval;
@@ -492,13 +458,12 @@ static int osf_cdfs_mount(char *dirname, struct cdfs_args *args, int flags)
if (copy_from_user(&tmp, args, sizeof(tmp)))
goto out;
- retval = getdev(tmp.devname, 1, &dentry);
- if (retval)
+ dentry = getdev(tmp.devname, 1);
+ retval = PTR_ERR(dentry);
+ if (IS_ERR(dentry))
goto out;
- retval = do_mount(dentry->d_inode->i_rdev, tmp.devname, dirname,
+ retval = do_mount(dentry->d_inode->i_bdev, tmp.devname, dirname,
"iso9660", flags, NULL);
- if (retval)
- putdev(dentry);
dput(dentry);
out:
return retval;
@@ -506,19 +471,12 @@ out:
static int osf_procfs_mount(char *dirname, struct procfs_args *args, int flags)
{
- kdev_t dev;
int retval;
struct procfs_args tmp;
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;
- dev = get_unnamed_dev();
- if (!dev)
- return -ENODEV;
- retval = do_mount(dev, "", dirname, "proc", flags, NULL);
- if (retval)
- put_unnamed_dev(dev);
- return retval;
+ return do_mount(NULL, "", dirname, "proc", flags, NULL);
}
asmlinkage int osf_mount(unsigned long typenr, char *path, int flag, void *data)
@@ -1442,3 +1400,103 @@ asmlinkage int sys_old_adjtimex(struct timex32 *txc_p)
return ret;
}
+
+struct shmid_ds_old {
+ struct ipc_perm shm_perm; /* operation perms */
+ int shm_segsz; /* size of segment (bytes) */
+ __kernel_time_t shm_atime; /* last attach time */
+ __kernel_time_t shm_dtime; /* last detach time */
+ __kernel_time_t shm_ctime; /* last change time */
+ __kernel_ipc_pid_t shm_cpid; /* pid of creator */
+ __kernel_ipc_pid_t shm_lpid; /* pid of last operator */
+ unsigned short shm_nattch; /* no. of current attaches */
+ unsigned short shm_unused; /* compatibility */
+ void *shm_unused2; /* ditto - used by DIPC */
+ void *shm_unused3; /* unused */
+};
+
+struct shminfo_old {
+ int shmmax;
+ int shmmin;
+ int shmmni;
+ int shmseg;
+ int shmall;
+};
+
+asmlinkage long sys_shmctlold(int shmid, int cmd, struct shmid_ds_old *buf)
+{
+ struct shmid_ds arg;
+ long ret;
+ mm_segment_t old_fs;
+
+ if (cmd == IPC_SET) {
+ struct shmid_ds_old tbuf;
+
+ if(copy_from_user (&tbuf, buf, sizeof(*buf)))
+ return -EFAULT;
+ arg.shm_perm = tbuf.shm_perm;
+ arg.shm_segsz = tbuf.shm_segsz;
+ arg.shm_atime = tbuf.shm_atime;
+ arg.shm_dtime = tbuf.shm_dtime;
+ arg.shm_ctime = tbuf.shm_ctime;
+ arg.shm_cpid = tbuf.shm_cpid;
+ arg.shm_lpid = tbuf.shm_lpid;
+ arg.shm_nattch = tbuf.shm_nattch;
+ arg.shm_unused = tbuf.shm_unused;
+ arg.shm_unused2 = tbuf.shm_unused2;
+ arg.shm_unused3 = tbuf.shm_unused3;
+ }
+ old_fs = get_fs ();
+ set_fs (KERNEL_DS);
+ ret = sys_shmctl(shmid, cmd, &arg);
+ set_fs (old_fs);
+ if (ret < 0)
+ return(ret);
+ switch(cmd) {
+ case IPC_INFO:
+ {
+ struct shminfo *tbuf = (struct shminfo *) &arg;
+ struct shminfo_old shminfo_oldst;
+
+ shminfo_oldst.shmmax = (tbuf->shmmax > INT_MAX ?
+ INT_MAX : tbuf->shmmax);
+ shminfo_oldst.shmmin = tbuf->shmmin;
+ shminfo_oldst.shmmni = tbuf->shmmni;
+ shminfo_oldst.shmseg = tbuf->shmseg;
+ shminfo_oldst.shmall = tbuf->shmall;
+ if (copy_to_user(buf, &shminfo_oldst,
+ sizeof(struct shminfo_old)))
+ return -EFAULT;
+ return(ret);
+ }
+ case SHM_INFO:
+ {
+ struct shm_info *tbuf = (struct shm_info *) &arg;
+
+ if (copy_to_user (buf, tbuf, sizeof(struct shm_info)))
+ return -EFAULT;
+ return(ret);
+ }
+ case SHM_STAT:
+ case IPC_STAT:
+ {
+ struct shmid_ds_old tbuf;
+
+ tbuf.shm_perm = arg.shm_perm;
+ tbuf.shm_segsz = arg.shm_segsz;
+ tbuf.shm_atime = arg.shm_atime;
+ tbuf.shm_dtime = arg.shm_dtime;
+ tbuf.shm_ctime = arg.shm_ctime;
+ tbuf.shm_cpid = arg.shm_cpid;
+ tbuf.shm_lpid = arg.shm_lpid;
+ tbuf.shm_nattch = arg.shm_nattch;
+ tbuf.shm_unused = arg.shm_unused;
+ tbuf.shm_unused2 = arg.shm_unused2;
+ tbuf.shm_unused3 = arg.shm_unused3;
+ if (copy_to_user (buf, &tbuf, sizeof(tbuf)))
+ return -EFAULT;
+ return(ret);
+ }
+ }
+ return(ret);
+}
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 9a61a4e99..601cb9401 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -58,6 +58,17 @@ quirk_isa_bridge(struct pci_dev *dev)
}
static void __init
+quirk_ali_ide_ports(struct pci_dev *dev)
+{
+ if (dev->resource[0].end == 0xffff)
+ dev->resource[0].end = dev->resource[0].start + 7;
+ if (dev->resource[2].end == 0xffff)
+ dev->resource[2].end = dev->resource[2].start + 7;
+ if (dev->resource[3].end == 0xffff)
+ dev->resource[3].end = dev->resource[3].start + 7;
+}
+
+static void __init
quirk_vga_enable_rom(struct pci_dev *dev)
{
/* If it's a VGA, enable its BIOS ROM at C0000.
@@ -82,6 +93,8 @@ struct pci_fixup pcibios_fixups[] __initdata = {
quirk_eisa_bridge },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378,
quirk_isa_bridge },
+ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229,
+ quirk_ali_ide_ports },
{ PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, quirk_vga_enable_rom },
{ 0 }
};
@@ -131,13 +144,7 @@ pcibios_align_resource(void *data, struct resource *res, unsigned long size)
/* Align to multiple of size of minimum base. */
alignto = MAX(0x1000, size);
start = ALIGN(start, alignto);
- if (size > 7 * 16*MB) {
- printk(KERN_WARNING "PCI: dev %s "
- "requests %ld bytes of contiguous "
- "address space---don't use sparse "
- "memory accesses on this device!\n",
- dev->name, size);
- } else {
+ if (size <= 7 * 16*MB) {
if (((start / (16*MB)) & 0x7) == 0) {
start &= ~(128*MB - 1);
start += 16*MB;
diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c
index b51eee671..423589924 100644
--- a/arch/alpha/kernel/sys_nautilus.c
+++ b/arch/alpha/kernel/sys_nautilus.c
@@ -88,13 +88,28 @@ nautilus_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
void
nautilus_kill_arch(int mode)
{
- u8 tmp;
+ switch (mode) {
+ case LINUX_REBOOT_CMD_RESTART:
+ {
+ u8 t8;
+ pcibios_read_config_byte(0, 0x38, 0x43, &t8);
+ pcibios_write_config_byte(0, 0x38, 0x43, t8 | 0x80);
+ outb(1, 0x92);
+ outb(0, 0x92);
+ /* NOTREACHED */
+ }
+ break;
- if (mode == LINUX_REBOOT_CMD_RESTART) {
- pcibios_read_config_byte(0, 0x38, 0x43, &tmp);
- pcibios_write_config_byte(0, 0x38, 0x43, tmp | 0x80);
- outb(1, 0x92);
- outb(0, 0x92);
+ case LINUX_REBOOT_CMD_POWER_OFF:
+ {
+ u32 pmuport;
+ pcibios_read_config_dword(0, 0x88, 0x10, &pmuport);
+ pmuport &= 0xfffe;
+ outl(0xffff, pmuport); /* clear pending events */
+ outw(0x2000, pmuport+4); /* power off */
+ /* NOTREACHED */
+ }
+ break;
}
}
@@ -435,8 +450,8 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr,
Add to that the two levels of severity - correctable or not. */
if (vector == SCB_Q_SYSMCHK
- && ((IRONGATE0->dramms & 0x3FF) == 0x300)) {
- unsigned long nmi_ctl, temp;
+ && ((IRONGATE0->dramms & 0x300) == 0x300)) {
+ unsigned long nmi_ctl;
/* Clear ALI NMI */
nmi_ctl = inb(0x61);
@@ -445,15 +460,15 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr,
nmi_ctl &= ~0x0c;
outb(nmi_ctl, 0x61);
- temp = IRONGATE0->stat_cmd;
- IRONGATE0->stat_cmd = temp; /* write again clears error bits */
+ /* Write again clears error bits. */
+ IRONGATE0->stat_cmd = IRONGATE0->stat_cmd & ~0x100;
mb();
- temp = IRONGATE0->stat_cmd; /* re-read to force write */
+ IRONGATE0->stat_cmd;
- temp = IRONGATE0->dramms;
- IRONGATE0->dramms = temp; /* write again clears error bits */
+ /* Write again clears error bits. */
+ IRONGATE0->dramms = IRONGATE0->dramms;
mb();
- temp = IRONGATE0->dramms; /* re-read to force write */
+ IRONGATE0->dramms;
draina();
wrmces(0x7);
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index f26991f55..78025bec9 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -141,7 +141,7 @@ sio_collect_irq_levels(void)
struct pci_dev *dev;
/* Iterate through the devices, collecting IRQ levels. */
- for (dev = pci_devices; dev; dev = dev->next) {
+ pci_for_each_dev(dev) {
if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
(dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
continue;
diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile
index a224f84bb..52571557b 100644
--- a/arch/alpha/lib/Makefile
+++ b/arch/alpha/lib/Makefile
@@ -14,16 +14,16 @@ lib.a: $(OBJS)
$(AR) rcs lib.a $(OBJS)
__divqu.o: divide.S
- $(CC) -DDIV -c -o __divqu.o divide.S
+ $(CC) $(AFLAGS) -DDIV -c -o __divqu.o divide.S
__remqu.o: divide.S
- $(CC) -DREM -c -o __remqu.o divide.S
+ $(CC) $(AFLAGS) -DREM -c -o __remqu.o divide.S
__divlu.o: divide.S
- $(CC) -DDIV -DINTSIZE -c -o __divlu.o divide.S
+ $(CC) $(AFLAGS) -DDIV -DINTSIZE -c -o __divlu.o divide.S
__remlu.o: divide.S
- $(CC) -DREM -DINTSIZE -c -o __remlu.o divide.S
+ $(CC) $(AFLAGS) -DREM -DINTSIZE -c -o __remlu.o divide.S
dep:
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index 8c40bc6a2..daaa36e09 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -308,6 +308,7 @@ mem_init(void)
{
max_mapnr = num_physpages = max_low_pfn;
totalram_pages += free_all_bootmem();
+ high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
printk_memory_info();
}