aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/Makefile1
-rw-r--r--arch/alpha/kernel/core_t2.c2
-rw-r--r--arch/alpha/kernel/init_task.c1
-rw-r--r--arch/alpha/kernel/osf_sys.c69
-rw-r--r--arch/alpha/kernel/pci.c17
-rw-r--r--arch/alpha/kernel/traps.c3
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S14
7 files changed, 33 insertions, 74 deletions
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile
index 4e1a8e2c4541..4759fe751aa1 100644
--- a/arch/alpha/Makefile
+++ b/arch/alpha/Makefile
@@ -13,6 +13,7 @@ NM := $(NM) -B
13LDFLAGS_vmlinux := -static -N #-relax 13LDFLAGS_vmlinux := -static -N #-relax
14CHECKFLAGS += -D__alpha__ -m64 14CHECKFLAGS += -D__alpha__ -m64
15cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data 15cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data
16cflags-y += $(call cc-option, -fno-jump-tables)
16 17
17cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4 18cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4
18cpuflags-$(CONFIG_ALPHA_EV5) := -mcpu=ev5 19cpuflags-$(CONFIG_ALPHA_EV5) := -mcpu=ev5
diff --git a/arch/alpha/kernel/core_t2.c b/arch/alpha/kernel/core_t2.c
index c0750291b44a..d9980d47ab81 100644
--- a/arch/alpha/kernel/core_t2.c
+++ b/arch/alpha/kernel/core_t2.c
@@ -74,6 +74,8 @@
74# define DBG(args) 74# define DBG(args)
75#endif 75#endif
76 76
77DEFINE_SPINLOCK(t2_hae_lock);
78
77static volatile unsigned int t2_mcheck_any_expected; 79static volatile unsigned int t2_mcheck_any_expected;
78static volatile unsigned int t2_mcheck_last_taken; 80static volatile unsigned int t2_mcheck_last_taken;
79 81
diff --git a/arch/alpha/kernel/init_task.c b/arch/alpha/kernel/init_task.c
index 835d09a7b332..1f762189fa64 100644
--- a/arch/alpha/kernel/init_task.c
+++ b/arch/alpha/kernel/init_task.c
@@ -9,7 +9,6 @@
9 9
10 10
11static struct fs_struct init_fs = INIT_FS; 11static struct fs_struct init_fs = INIT_FS;
12static struct files_struct init_files = INIT_FILES;
13static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 12static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
14static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 13static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
15struct mm_struct init_mm = INIT_MM(init_mm); 14struct mm_struct init_mm = INIT_MM(init_mm);
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 9fee37e2596f..32ca1b927307 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -981,27 +981,18 @@ asmlinkage int
981osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, 981osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
982 struct timeval32 __user *tvp) 982 struct timeval32 __user *tvp)
983{ 983{
984 fd_set_bits fds; 984 s64 timeout = MAX_SCHEDULE_TIMEOUT;
985 char *bits;
986 size_t size;
987 long timeout;
988 int ret = -EINVAL;
989 struct fdtable *fdt;
990 int max_fds;
991
992 timeout = MAX_SCHEDULE_TIMEOUT;
993 if (tvp) { 985 if (tvp) {
994 time_t sec, usec; 986 time_t sec, usec;
995 987
996 if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp)) 988 if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp))
997 || __get_user(sec, &tvp->tv_sec) 989 || __get_user(sec, &tvp->tv_sec)
998 || __get_user(usec, &tvp->tv_usec)) { 990 || __get_user(usec, &tvp->tv_usec)) {
999 ret = -EFAULT; 991 return -EFAULT;
1000 goto out_nofds;
1001 } 992 }
1002 993
1003 if (sec < 0 || usec < 0) 994 if (sec < 0 || usec < 0)
1004 goto out_nofds; 995 return -EINVAL;
1005 996
1006 if ((unsigned long) sec < MAX_SELECT_SECONDS) { 997 if ((unsigned long) sec < MAX_SELECT_SECONDS) {
1007 timeout = (usec + 1000000/HZ - 1) / (1000000/HZ); 998 timeout = (usec + 1000000/HZ - 1) / (1000000/HZ);
@@ -1009,60 +1000,8 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
1009 } 1000 }
1010 } 1001 }
1011 1002
1012 rcu_read_lock();
1013 fdt = files_fdtable(current->files);
1014 max_fds = fdt->max_fds;
1015 rcu_read_unlock();
1016 if (n < 0 || n > max_fds)
1017 goto out_nofds;
1018
1019 /*
1020 * We need 6 bitmaps (in/out/ex for both incoming and outgoing),
1021 * since we used fdset we need to allocate memory in units of
1022 * long-words.
1023 */
1024 ret = -ENOMEM;
1025 size = FDS_BYTES(n);
1026 bits = kmalloc(6 * size, GFP_KERNEL);
1027 if (!bits)
1028 goto out_nofds;
1029 fds.in = (unsigned long *) bits;
1030 fds.out = (unsigned long *) (bits + size);
1031 fds.ex = (unsigned long *) (bits + 2*size);
1032 fds.res_in = (unsigned long *) (bits + 3*size);
1033 fds.res_out = (unsigned long *) (bits + 4*size);
1034 fds.res_ex = (unsigned long *) (bits + 5*size);
1035
1036 if ((ret = get_fd_set(n, inp->fds_bits, fds.in)) ||
1037 (ret = get_fd_set(n, outp->fds_bits, fds.out)) ||
1038 (ret = get_fd_set(n, exp->fds_bits, fds.ex)))
1039 goto out;
1040 zero_fd_set(n, fds.res_in);
1041 zero_fd_set(n, fds.res_out);
1042 zero_fd_set(n, fds.res_ex);
1043
1044 ret = do_select(n, &fds, &timeout);
1045
1046 /* OSF does not copy back the remaining time. */ 1003 /* OSF does not copy back the remaining time. */
1047 1004 return core_sys_select(n, inp, outp, exp, &timeout);
1048 if (ret < 0)
1049 goto out;
1050 if (!ret) {
1051 ret = -ERESTARTNOHAND;
1052 if (signal_pending(current))
1053 goto out;
1054 ret = 0;
1055 }
1056
1057 if (set_fd_set(n, inp->fds_bits, fds.res_in) ||
1058 set_fd_set(n, outp->fds_bits, fds.res_out) ||
1059 set_fd_set(n, exp->fds_bits, fds.res_ex))
1060 ret = -EFAULT;
1061
1062 out:
1063 kfree(bits);
1064 out_nofds:
1065 return ret;
1066} 1005}
1067 1006
1068struct rusage32 { 1007struct rusage32 {
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 36ab22a7ea12..5cf45fc51343 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -71,6 +71,23 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_i
71static void __init 71static void __init
72quirk_cypress(struct pci_dev *dev) 72quirk_cypress(struct pci_dev *dev)
73{ 73{
74 /* The Notorious Cy82C693 chip. */
75
76 /* The generic legacy mode IDE fixup in drivers/pci/probe.c
77 doesn't work correctly with the Cypress IDE controller as
78 it has non-standard register layout. Fix that. */
79 if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE) {
80 dev->resource[2].start = dev->resource[3].start = 0;
81 dev->resource[2].end = dev->resource[3].end = 0;
82 dev->resource[2].flags = dev->resource[3].flags = 0;
83 if (PCI_FUNC(dev->devfn) == 2) {
84 dev->resource[0].start = 0x170;
85 dev->resource[0].end = 0x177;
86 dev->resource[1].start = 0x376;
87 dev->resource[1].end = 0x376;
88 }
89 }
90
74 /* The Cypress bridge responds on the PCI bus in the address range 91 /* The Cypress bridge responds on the PCI bus in the address range
75 0xffff0000-0xffffffff (conventional x86 BIOS ROM). There is no 92 0xffff0000-0xffffffff (conventional x86 BIOS ROM). There is no
76 way to turn this off. The bridge also supports several extended 93 way to turn this off. The bridge also supports several extended
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index dc57790250d2..c778779007fc 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -447,7 +447,7 @@ struct unaligned_stat {
447 447
448 448
449/* Macro for exception fixup code to access integer registers. */ 449/* Macro for exception fixup code to access integer registers. */
450#define una_reg(r) (regs->regs[(r) >= 16 && (r) <= 18 ? (r)+19 : (r)]) 450#define una_reg(r) (_regs[(r) >= 16 && (r) <= 18 ? (r)+19 : (r)])
451 451
452 452
453asmlinkage void 453asmlinkage void
@@ -456,6 +456,7 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
456{ 456{
457 long error, tmp1, tmp2, tmp3, tmp4; 457 long error, tmp1, tmp2, tmp3, tmp4;
458 unsigned long pc = regs->pc - 4; 458 unsigned long pc = regs->pc - 4;
459 unsigned long *_regs = regs->regs;
459 const struct exception_table_entry *fixup; 460 const struct exception_table_entry *fixup;
460 461
461 unaligned[0].count++; 462 unaligned[0].count++;
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index f13249be17c5..ef37fc1acaea 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -25,6 +25,13 @@ SECTIONS
25 } :kernel 25 } :kernel
26 _etext = .; /* End of text section */ 26 _etext = .; /* End of text section */
27 27
28 NOTES :kernel :note
29 .dummy : {
30 *(.dummy)
31 } :kernel
32
33 RODATA
34
28 /* Exception table */ 35 /* Exception table */
29 . = ALIGN(16); 36 . = ALIGN(16);
30 __ex_table : { 37 __ex_table : {
@@ -33,13 +40,6 @@ SECTIONS
33 __stop___ex_table = .; 40 __stop___ex_table = .;
34 } 41 }
35 42
36 NOTES :kernel :note
37 .dummy : {
38 *(.dummy)
39 } :kernel
40
41 RODATA
42
43 /* Will be freed after init */ 43 /* Will be freed after init */
44 . = ALIGN(PAGE_SIZE); 44 . = ALIGN(PAGE_SIZE);
45 /* Init code and data */ 45 /* Init code and data */