aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/Kconfig8
-rw-r--r--arch/alpha/include/asm/a.out.h2
-rw-r--r--arch/alpha/include/asm/elf.h4
-rw-r--r--arch/alpha/include/asm/statfs.h4
-rw-r--r--arch/alpha/include/asm/thread_info.h2
-rw-r--r--arch/alpha/kernel/core_marvel.c4
-rw-r--r--arch/alpha/kernel/pci_iommu.c17
-rw-r--r--arch/alpha/kernel/smp.c1
-rw-r--r--arch/alpha/kernel/sys_sable.c6
-rw-r--r--arch/alpha/kernel/time.c18
10 files changed, 32 insertions, 34 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 1bec55d63ef6..6110197757a3 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -5,6 +5,7 @@
5config ALPHA 5config ALPHA
6 bool 6 bool
7 default y 7 default y
8 select HAVE_AOUT
8 select HAVE_IDE 9 select HAVE_IDE
9 select HAVE_OPROFILE 10 select HAVE_OPROFILE
10 help 11 help
@@ -68,10 +69,8 @@ config AUTO_IRQ_AFFINITY
68 depends on SMP 69 depends on SMP
69 default y 70 default y
70 71
71config ARCH_SUPPORTS_AOUT
72 def_bool y
73
74source "init/Kconfig" 72source "init/Kconfig"
73source "kernel/Kconfig.freezer"
75 74
76 75
77menu "System setup" 76menu "System setup"
@@ -224,8 +223,7 @@ config ALPHA_MIATA
224 bool "Miata" 223 bool "Miata"
225 help 224 help
226 The Digital PersonalWorkStation (PWS 433a, 433au, 500a, 500au, 600a, 225 The Digital PersonalWorkStation (PWS 433a, 433au, 500a, 500au, 600a,
227 or 600au). There is an Installation HOWTO for this hardware at 226 or 600au).
228 <http://eijk.homelinux.org/~stefan/miata.html>.
229 227
230config ALPHA_MIKASA 228config ALPHA_MIKASA
231 bool "Mikasa" 229 bool "Mikasa"
diff --git a/arch/alpha/include/asm/a.out.h b/arch/alpha/include/asm/a.out.h
index 02ce8473870a..acdc681231cb 100644
--- a/arch/alpha/include/asm/a.out.h
+++ b/arch/alpha/include/asm/a.out.h
@@ -95,7 +95,7 @@ struct exec
95 Worse, we have to notice the start address before swapping to use 95 Worse, we have to notice the start address before swapping to use
96 /sbin/loader, which of course is _not_ a TASO application. */ 96 /sbin/loader, which of course is _not_ a TASO application. */
97#define SET_AOUT_PERSONALITY(BFPM, EX) \ 97#define SET_AOUT_PERSONALITY(BFPM, EX) \
98 set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \ 98 set_personality (((BFPM->taso || EX.ah.entry < 0x100000000L \
99 ? ADDR_LIMIT_32BIT : 0) | PER_OSF4)) 99 ? ADDR_LIMIT_32BIT : 0) | PER_OSF4))
100 100
101#endif /* __KERNEL__ */ 101#endif /* __KERNEL__ */
diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h
index fc1002ea1e0c..5c75c1b2352a 100644
--- a/arch/alpha/include/asm/elf.h
+++ b/arch/alpha/include/asm/elf.h
@@ -144,9 +144,9 @@ extern int dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task);
144 : amask (AMASK_CIX) ? "ev6" : "ev67"); \ 144 : amask (AMASK_CIX) ? "ev6" : "ev67"); \
145}) 145})
146 146
147#define SET_PERSONALITY(EX, IBCS2) \ 147#define SET_PERSONALITY(EX) \
148 set_personality(((EX).e_flags & EF_ALPHA_32BIT) \ 148 set_personality(((EX).e_flags & EF_ALPHA_32BIT) \
149 ? PER_LINUX_32BIT : (IBCS2) ? PER_SVR4 : PER_LINUX) 149 ? PER_LINUX_32BIT : PER_LINUX)
150 150
151extern int alpha_l1i_cacheshape; 151extern int alpha_l1i_cacheshape;
152extern int alpha_l1d_cacheshape; 152extern int alpha_l1d_cacheshape;
diff --git a/arch/alpha/include/asm/statfs.h b/arch/alpha/include/asm/statfs.h
index ad15830baefe..de35cd438a10 100644
--- a/arch/alpha/include/asm/statfs.h
+++ b/arch/alpha/include/asm/statfs.h
@@ -1,6 +1,10 @@
1#ifndef _ALPHA_STATFS_H 1#ifndef _ALPHA_STATFS_H
2#define _ALPHA_STATFS_H 2#define _ALPHA_STATFS_H
3 3
4/* Alpha is the only 64-bit platform with 32-bit statfs. And doesn't
5 even seem to implement statfs64 */
6#define __statfs_word __u32
7
4#include <asm-generic/statfs.h> 8#include <asm-generic/statfs.h>
5 9
6#endif 10#endif
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h
index 15fda4344424..d069526bd767 100644
--- a/arch/alpha/include/asm/thread_info.h
+++ b/arch/alpha/include/asm/thread_info.h
@@ -74,12 +74,14 @@ register struct thread_info *__current_thread_info __asm__("$8");
74#define TIF_UAC_SIGBUS 7 74#define TIF_UAC_SIGBUS 7
75#define TIF_MEMDIE 8 75#define TIF_MEMDIE 8
76#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */ 76#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */
77#define TIF_FREEZE 16 /* is freezing for suspend */
77 78
78#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 79#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
79#define _TIF_SIGPENDING (1<<TIF_SIGPENDING) 80#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
80#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) 81#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
81#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 82#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
82#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) 83#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
84#define _TIF_FREEZE (1<<TIF_FREEZE)
83 85
84/* Work to do on interrupt/exception return. */ 86/* Work to do on interrupt/exception return. */
85#define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED) 87#define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c
index 04dcc5e5d4c1..9cd8dca742a7 100644
--- a/arch/alpha/kernel/core_marvel.c
+++ b/arch/alpha/kernel/core_marvel.c
@@ -655,7 +655,7 @@ __marvel_rtc_io(u8 b, unsigned long addr, int write)
655 655
656 case 0x71: /* RTC_PORT(1) */ 656 case 0x71: /* RTC_PORT(1) */
657 rtc_access.index = index; 657 rtc_access.index = index;
658 rtc_access.data = BCD_TO_BIN(b); 658 rtc_access.data = bcd2bin(b);
659 rtc_access.function = 0x48 + !write; /* GET/PUT_TOY */ 659 rtc_access.function = 0x48 + !write; /* GET/PUT_TOY */
660 660
661#ifdef CONFIG_SMP 661#ifdef CONFIG_SMP
@@ -668,7 +668,7 @@ __marvel_rtc_io(u8 b, unsigned long addr, int write)
668#else 668#else
669 __marvel_access_rtc(&rtc_access); 669 __marvel_access_rtc(&rtc_access);
670#endif 670#endif
671 ret = BIN_TO_BCD(rtc_access.data); 671 ret = bin2bcd(rtc_access.data);
672 break; 672 break;
673 673
674 default: 674 default:
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index 2179c602032a..b9094da05d7a 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -41,13 +41,6 @@ mk_iommu_pte(unsigned long paddr)
41 return (paddr >> (PAGE_SHIFT-1)) | 1; 41 return (paddr >> (PAGE_SHIFT-1)) | 1;
42} 42}
43 43
44static inline long
45calc_npages(long bytes)
46{
47 return (bytes + PAGE_SIZE - 1) >> PAGE_SHIFT;
48}
49
50
51/* Return the minimum of MAX or the first power of two larger 44/* Return the minimum of MAX or the first power of two larger
52 than main memory. */ 45 than main memory. */
53 46
@@ -287,7 +280,7 @@ pci_map_single_1(struct pci_dev *pdev, void *cpu_addr, size_t size,
287 if (!arena || arena->dma_base + arena->size - 1 > max_dma) 280 if (!arena || arena->dma_base + arena->size - 1 > max_dma)
288 arena = hose->sg_isa; 281 arena = hose->sg_isa;
289 282
290 npages = calc_npages((paddr & ~PAGE_MASK) + size); 283 npages = iommu_num_pages(paddr, size, PAGE_SIZE);
291 284
292 /* Force allocation to 64KB boundary for ISA bridges. */ 285 /* Force allocation to 64KB boundary for ISA bridges. */
293 if (pdev && pdev == isa_bridge) 286 if (pdev && pdev == isa_bridge)
@@ -387,7 +380,7 @@ pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
387 BUG(); 380 BUG();
388 } 381 }
389 382
390 npages = calc_npages((dma_addr & ~PAGE_MASK) + size); 383 npages = iommu_num_pages(dma_addr, size, PAGE_SIZE);
391 384
392 spin_lock_irqsave(&arena->lock, flags); 385 spin_lock_irqsave(&arena->lock, flags);
393 386
@@ -580,7 +573,7 @@ sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
580 contiguous. */ 573 contiguous. */
581 574
582 paddr &= ~PAGE_MASK; 575 paddr &= ~PAGE_MASK;
583 npages = calc_npages(paddr + size); 576 npages = iommu_num_pages(paddr, size, PAGE_SIZE);
584 dma_ofs = iommu_arena_alloc(dev, arena, npages, 0); 577 dma_ofs = iommu_arena_alloc(dev, arena, npages, 0);
585 if (dma_ofs < 0) { 578 if (dma_ofs < 0) {
586 /* If we attempted a direct map above but failed, die. */ 579 /* If we attempted a direct map above but failed, die. */
@@ -616,7 +609,7 @@ sg_fill(struct device *dev, struct scatterlist *leader, struct scatterlist *end,
616 sg++; 609 sg++;
617 } 610 }
618 611
619 npages = calc_npages((paddr & ~PAGE_MASK) + size); 612 npages = iommu_num_pages(paddr, size, PAGE_SIZE);
620 613
621 paddr &= PAGE_MASK; 614 paddr &= PAGE_MASK;
622 for (i = 0; i < npages; ++i, paddr += PAGE_SIZE) 615 for (i = 0; i < npages; ++i, paddr += PAGE_SIZE)
@@ -775,7 +768,7 @@ pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
775 DBGA(" (%ld) sg [%lx,%lx]\n", 768 DBGA(" (%ld) sg [%lx,%lx]\n",
776 sg - end + nents, addr, size); 769 sg - end + nents, addr, size);
777 770
778 npages = calc_npages((addr & ~PAGE_MASK) + size); 771 npages = iommu_num_pages(addr, size, PAGE_SIZE);
779 ofs = (addr - arena->dma_base) >> PAGE_SHIFT; 772 ofs = (addr - arena->dma_base) >> PAGE_SHIFT;
780 iommu_arena_free(arena, ofs, npages); 773 iommu_arena_free(arena, ofs, npages);
781 774
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 06b6fdab639f..e657c45d91d2 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -27,6 +27,7 @@
27#include <linux/cache.h> 27#include <linux/cache.h>
28#include <linux/profile.h> 28#include <linux/profile.h>
29#include <linux/bitops.h> 29#include <linux/bitops.h>
30#include <linux/cpu.h>
30 31
31#include <asm/hwrpb.h> 32#include <asm/hwrpb.h>
32#include <asm/ptrace.h> 33#include <asm/ptrace.h>
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c
index 99a7f19da13a..a4555f497639 100644
--- a/arch/alpha/kernel/sys_sable.c
+++ b/arch/alpha/kernel/sys_sable.c
@@ -47,7 +47,7 @@ typedef struct irq_swizzle_struct
47 47
48static irq_swizzle_t *sable_lynx_irq_swizzle; 48static irq_swizzle_t *sable_lynx_irq_swizzle;
49 49
50static void sable_lynx_init_irq(int nr_irqs); 50static void sable_lynx_init_irq(int nr_of_irqs);
51 51
52#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SABLE) 52#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SABLE)
53 53
@@ -530,11 +530,11 @@ sable_lynx_srm_device_interrupt(unsigned long vector)
530} 530}
531 531
532static void __init 532static void __init
533sable_lynx_init_irq(int nr_irqs) 533sable_lynx_init_irq(int nr_of_irqs)
534{ 534{
535 long i; 535 long i;
536 536
537 for (i = 0; i < nr_irqs; ++i) { 537 for (i = 0; i < nr_of_irqs; ++i) {
538 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; 538 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
539 irq_desc[i].chip = &sable_lynx_irq_type; 539 irq_desc[i].chip = &sable_lynx_irq_type;
540 } 540 }
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 75480cab0893..e6a231435cba 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -346,12 +346,12 @@ time_init(void)
346 year = CMOS_READ(RTC_YEAR); 346 year = CMOS_READ(RTC_YEAR);
347 347
348 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 348 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
349 BCD_TO_BIN(sec); 349 sec = bcd2bin(sec);
350 BCD_TO_BIN(min); 350 min = bcd2bin(min);
351 BCD_TO_BIN(hour); 351 hour = bcd2bin(hour);
352 BCD_TO_BIN(day); 352 day = bcd2bin(day);
353 BCD_TO_BIN(mon); 353 mon = bcd2bin(mon);
354 BCD_TO_BIN(year); 354 year = bcd2bin(year);
355 } 355 }
356 356
357 /* PC-like is standard; used for year >= 70 */ 357 /* PC-like is standard; used for year >= 70 */
@@ -525,7 +525,7 @@ set_rtc_mmss(unsigned long nowtime)
525 525
526 cmos_minutes = CMOS_READ(RTC_MINUTES); 526 cmos_minutes = CMOS_READ(RTC_MINUTES);
527 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) 527 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
528 BCD_TO_BIN(cmos_minutes); 528 cmos_minutes = bcd2bin(cmos_minutes);
529 529
530 /* 530 /*
531 * since we're only adjusting minutes and seconds, 531 * since we're only adjusting minutes and seconds,
@@ -543,8 +543,8 @@ set_rtc_mmss(unsigned long nowtime)
543 543
544 if (abs(real_minutes - cmos_minutes) < 30) { 544 if (abs(real_minutes - cmos_minutes) < 30) {
545 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 545 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
546 BIN_TO_BCD(real_seconds); 546 real_seconds = bin2bcd(real_seconds);
547 BIN_TO_BCD(real_minutes); 547 real_minutes = bin2bcd(real_minutes);
548 } 548 }
549 CMOS_WRITE(real_seconds,RTC_SECONDS); 549 CMOS_WRITE(real_seconds,RTC_SECONDS);
550 CMOS_WRITE(real_minutes,RTC_MINUTES); 550 CMOS_WRITE(real_minutes,RTC_MINUTES);