diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
commit | 482368b1a8e45430672c58c9a42e7d2004367126 (patch) | |
tree | ce2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /include/asm-alpha | |
parent | e4d0251c6f56ab2e191afb70f80f382793e23f74 (diff) |
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'include/asm-alpha')
-rw-r--r-- | include/asm-alpha/core_mcpcia.h | 4 | ||||
-rw-r--r-- | include/asm-alpha/hardirq.h | 3 | ||||
-rw-r--r-- | include/asm-alpha/hw_irq.h | 94 | ||||
-rw-r--r-- | include/asm-alpha/hwrpb.h | 6 | ||||
-rw-r--r-- | include/asm-alpha/machvec.h | 3 | ||||
-rw-r--r-- | include/asm-alpha/page.h | 14 | ||||
-rw-r--r-- | include/asm-alpha/pci.h | 24 | ||||
-rw-r--r-- | include/asm-alpha/pgalloc.h | 37 | ||||
-rw-r--r-- | include/asm-alpha/pgtable.h | 5 | ||||
-rw-r--r-- | include/asm-alpha/smp.h | 3 |
10 files changed, 77 insertions, 116 deletions
diff --git a/include/asm-alpha/core_mcpcia.h b/include/asm-alpha/core_mcpcia.h index fb100e508..bc3e44267 100644 --- a/include/asm-alpha/core_mcpcia.h +++ b/include/asm-alpha/core_mcpcia.h @@ -74,6 +74,10 @@ #define MCPCIA_MID(m) ((unsigned long)(m) << 33) +/* Dodge has PCI0 and PCI1 at MID 4 and 5 respectively. + Durango adds PCI2 and PCI3 at MID 6 and 7 respectively. */ +#define MCPCIA_HOSE2MID(h) ((h) + 4) + #define MCPCIA_MEM_MASK 0x07ffffff /* SPARSE Mem region mask is 27 bits */ /* diff --git a/include/asm-alpha/hardirq.h b/include/asm-alpha/hardirq.h index 86e895b83..6f8b9ffe3 100644 --- a/include/asm-alpha/hardirq.h +++ b/include/asm-alpha/hardirq.h @@ -8,8 +8,11 @@ #ifndef __SMP__ extern int __local_irq_count; #define local_irq_count(cpu) ((void)(cpu), __local_irq_count) +extern unsigned long __irq_attempt[]; +#define irq_attempt(cpu, irq) ((void)(cpu), __irq_attempt[irq]) #else #define local_irq_count(cpu) (cpu_data[cpu].irq_count) +#define irq_attempt(cpu, irq) (cpu_data[cpu].irq_attempt[irq]) #endif /* diff --git a/include/asm-alpha/hw_irq.h b/include/asm-alpha/hw_irq.h index c6af57999..1bf6629b4 100644 --- a/include/asm-alpha/hw_irq.h +++ b/include/asm-alpha/hw_irq.h @@ -1,91 +1,5 @@ -#ifndef _ALPHA_HW_IRQ_H -#define _ALPHA_HW_IRQ_H -/* - * linux/arch/alpha/kernel/irq.h - * - * Copyright (C) 1995 Linus Torvalds - * Copyright (C) 1998 Richard Henderson - * - * This file contains declarations and inline functions for interfacing - * with the IRQ handling routines in irq.c. - */ +/* This exists merely to satisfy <linux/irq.h>. There is + nothing that would go here of general interest. -#include <linux/config.h> - -#define STANDARD_INIT_IRQ_PROLOG \ - outb(0, DMA1_RESET_REG); \ - outb(0, DMA2_RESET_REG); \ - outb(0, DMA1_CLR_MASK_REG); \ - outb(0, DMA2_CLR_MASK_REG) - -extern unsigned long _alpha_irq_masks[2]; -#define alpha_irq_mask _alpha_irq_masks[0] - -extern void common_ack_irq(unsigned long irq); -extern void isa_device_interrupt(unsigned long vector, struct pt_regs * regs); -extern void srm_device_interrupt(unsigned long vector, struct pt_regs * regs); - -extern void handle_irq(int irq, int ack, struct pt_regs * regs); - -#define RTC_IRQ 8 -#ifdef CONFIG_RTC -#define TIMER_IRQ 0 /* timer is the pit */ -#else -#define TIMER_IRQ RTC_IRQ /* timer is the rtc */ -#endif - -/* - * PROBE_MASK is the bitset of irqs that we consider for autoprobing. - */ - -/* NOTE: we only handle the first 64 IRQs in this code. */ - -/* The normal mask includes all the IRQs except timer IRQ 0. */ -#define _PROBE_MASK(nr_irqs) \ - (((nr_irqs > 63) ? ~0UL : ((1UL << (nr_irqs & 63)) - 1)) & ~1UL) - -/* Mask out unused timer irq 0 and RTC irq 8. */ -#define P2K_PROBE_MASK (_PROBE_MASK(16) & ~0x101UL) - -/* Mask out unused timer irq 0, "irqs" 20-30, and the EISA cascade. */ -#define ALCOR_PROBE_MASK (_PROBE_MASK(48) & ~0xfff000000001UL) - -/* Leave timer IRQ 0 in the mask. */ -#define RUFFIAN_PROBE_MASK (_PROBE_MASK(48) | 1UL) - -/* Do not probe/enable beyond the PCI devices. */ -#define TSUNAMI_PROBE_MASK _PROBE_MASK(48) - -#if defined(CONFIG_ALPHA_GENERIC) -# define PROBE_MASK alpha_mv.irq_probe_mask -#elif defined(CONFIG_ALPHA_P2K) -# define PROBE_MASK P2K_PROBE_MASK -#elif defined(CONFIG_ALPHA_ALCOR) || defined(CONFIG_ALPHA_XLT) -# define PROBE_MASK ALCOR_PROBE_MASK -#elif defined(CONFIG_ALPHA_RUFFIAN) -# define PROBE_MASK RUFFIAN_PROBE_MASK -#elif defined(CONFIG_ALPHA_DP264) -# define PROBE_MASK TSUNAMI_PROBE_MASK -#else -# define PROBE_MASK _PROBE_MASK(NR_IRQS) -#endif - - -extern char _stext; -static inline void alpha_do_profile (unsigned long pc) -{ - if (prof_buffer && current->pid) { - pc -= (unsigned long) &_stext; - pc >>= prof_shift; - /* - * Don't ignore out-of-bounds PC values silently, - * put them into the last histogram slot, so if - * present, they will show up as a sharp peak. - */ - if (pc > prof_len - 1) - pc = prof_len - 1; - atomic_inc((atomic_t *)&prof_buffer[pc]); - } -} - -#endif + Everything of consequence is in arch/alpha/kernel/irq_impl.h, + to be used only in arch/alpha/kernel/. */ diff --git a/include/asm-alpha/hwrpb.h b/include/asm-alpha/hwrpb.h index ec710c9c8..39d84de1b 100644 --- a/include/asm-alpha/hwrpb.h +++ b/include/asm-alpha/hwrpb.h @@ -16,7 +16,7 @@ #define EV56_CPU 7 /* EV5.6 (21164) */ #define EV6_CPU 8 /* EV6 (21164) */ #define PCA56_CPU 9 /* PCA56 (21164PC) */ -#define PCA57_CPU 10 /* PCA57 (21164??) */ +#define PCA57_CPU 10 /* PCA57 (notyet) */ /* * DEC system types for Alpha systems. Found in HWRPB. @@ -62,8 +62,8 @@ #define ST_DTI_RUFFIAN 101 /* RUFFIAN systype */ /* Alpha Processor, Inc. systems */ -#define ST_API_BIAS 200 /* Offset for API systems */ -#define ST_API_NAUTILUS (ST_API_BIAS + 1) /* Nautilus systype */ +#define ST_API_BIAS 200 +#define ST_API_NAUTILUS 201 /* UP1000 systype */ struct pcb_struct { unsigned long ksp; diff --git a/include/asm-alpha/machvec.h b/include/asm-alpha/machvec.h index ccbed15fc..b8a2a1a96 100644 --- a/include/asm-alpha/machvec.h +++ b/include/asm-alpha/machvec.h @@ -22,6 +22,7 @@ struct linux_hose_info; struct pci_dev; struct pci_ops; struct pci_controler; +struct irqaction; struct alpha_machine_vector { @@ -81,7 +82,7 @@ struct alpha_machine_vector void (*init_arch)(void); void (*init_irq)(void); - void (*init_pit)(void); + void (*init_rtc)(struct irqaction *); void (*init_pci)(void); void (*kill_arch)(int); diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h index 17c61130a..d1dde606e 100644 --- a/include/asm-alpha/page.h +++ b/include/asm-alpha/page.h @@ -109,6 +109,20 @@ typedef unsigned long pgprot_t; #define BUG() __asm__ __volatile__("call_pal 129 # bugchk") #define PAGE_BUG(page) BUG() +/* Pure 2^n version of get_order */ +extern __inline__ int get_order(unsigned long size) +{ + int order; + + size = (size-1) >> (PAGE_SHIFT-1); + order = -1; + do { + size >>= 1; + order++; + } while (size); + return order; +} + #endif /* !ASSEMBLY */ /* to align the pointer to the (next) page boundary */ diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h index f5a9e09b8..0cf0e1c75 100644 --- a/include/asm-alpha/pci.h +++ b/include/asm-alpha/pci.h @@ -74,9 +74,9 @@ extern void pci_free_consistent(struct pci_dev *, long, void *, dma_addr_t); /* Map a single buffer of the indicate size for PCI DMA in streaming mode. The 32-bit PCI bus mastering address to use is returned. Once the device is given the dma address, the device owns this memory - until either pci_unmap_single or pci_sync_single is performed. */ + until either pci_unmap_single or pci_dma_sync_single is performed. */ -extern dma_addr_t pci_map_single(struct pci_dev *, void *, long); +extern dma_addr_t pci_map_single(struct pci_dev *, void *, long, int); /* Unmap a single streaming mode DMA translation. The DMA_ADDR and SIZE must match what was provided for in a previous pci_map_single @@ -84,7 +84,7 @@ extern dma_addr_t pci_map_single(struct pci_dev *, void *, long); the cpu to the buffer are guarenteed to see whatever the device wrote there. */ -extern void pci_unmap_single(struct pci_dev *, dma_addr_t, long); +extern void pci_unmap_single(struct pci_dev *, dma_addr_t, long, int); /* Map a set of buffers described by scatterlist in streaming mode for PCI DMA. This is the scather-gather version of the above @@ -100,13 +100,13 @@ extern void pci_unmap_single(struct pci_dev *, dma_addr_t, long); Device ownership issues as mentioned above for pci_map_single are the same here. */ -extern int pci_map_sg(struct pci_dev *, struct scatterlist *, int); +extern int pci_map_sg(struct pci_dev *, struct scatterlist *, int, int); /* Unmap a set of streaming mode DMA translations. Again, cpu read rules concerning calls here are the same as for pci_unmap_single() above. */ -extern void pci_unmap_sg(struct pci_dev *, struct scatterlist *, int); +extern void pci_unmap_sg(struct pci_dev *, struct scatterlist *, int, int); /* Make physical memory consistant for a single streaming mode DMA translation after a transfer. @@ -118,7 +118,7 @@ extern void pci_unmap_sg(struct pci_dev *, struct scatterlist *, int); again owns the buffer. */ extern inline void -pci_sync_single(struct pci_dev *dev, dma_addr_t dma_addr, long size) +pci_dma_sync_single(struct pci_dev *dev, dma_addr_t dma_addr, long size, int direction) { /* Nothing to do. */ } @@ -128,9 +128,19 @@ pci_sync_single(struct pci_dev *dev, dma_addr_t dma_addr, long size) for a scatter-gather list, same rules and usage. */ extern inline void -pci_sync_sg(struct pci_dev *dev, struct scatterlist *sg, int size) +pci_dma_sync_sg(struct pci_dev *dev, struct scatterlist *sg, int nents, int direction) { /* Nothing to do. */ } +/* Return whether the given PCI device DMA address mask can + * be supported properly. For example, if your device can + * only drive the low 24-bits during PCI bus mastering, then + * you would pass 0x00ffffff as the mask to this function. + */ +extern inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask) +{ + return 1; +} + #endif /* __ALPHA_PCI_H */ diff --git a/include/asm-alpha/pgalloc.h b/include/asm-alpha/pgalloc.h index ae10466b8..e4689c758 100644 --- a/include/asm-alpha/pgalloc.h +++ b/include/asm-alpha/pgalloc.h @@ -9,7 +9,18 @@ #define flush_cache_range(mm, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_page_to_ram(page) do { } while (0) -#define flush_icache_range(start, end) do { } while (0) +/* + * The icache is not coherent with the dcache on alpha, thus before + * running self modified code like kernel modules we must always run + * an imb(). + */ +#ifndef __SMP__ +#define flush_icache_range(start, end) imb() +#else +#define flush_icache_range(start, end) smp_imb() +extern void smp_imb(void); +#endif +#define flush_icache_page(vma, page) do { } while (0) /* * Use a few helper functions to hide the ugly broken ASN @@ -95,6 +106,18 @@ static inline void flush_tlb(void) flush_tlb_current(current->mm); } +/* + * Flush a specified range of user mapping page tables + * from TLB. + * Although Alpha uses VPTE caches, this can be a nop, as Alpha does + * not have finegrained tlb flushing, so it will flush VPTE stuff + * during next flush_tlb_range. + */ +static inline void flush_tlb_pgtables(struct mm_struct *mm, + unsigned long start, unsigned long end) +{ +} + #ifndef __SMP__ /* * Flush everything (kernel mapping may also have @@ -145,18 +168,6 @@ static inline void flush_tlb_range(struct mm_struct *mm, flush_tlb_mm(mm); } -/* - * Flush a specified range of user mapping page tables - * from TLB. - * Although Alpha uses VPTE caches, this can be a nop, as Alpha does - * not have finegrained tlb flushing, so it will flush VPTE stuff - * during next flush_tlb_range. - */ -static inline void flush_tlb_pgtables(struct mm_struct *mm, - unsigned long start, unsigned long end) -{ -} - #else /* __SMP__ */ extern void flush_tlb_all(void); diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index a627d50ba..ff8c6e9d1 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h @@ -249,8 +249,9 @@ extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; retu #define pgd_offset_k(address) pgd_offset(&init_mm, address) /* to find an entry in a page-table-directory. */ -#define __pgd_offset(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) -#define pgd_offset(mm, address) ((mm)->pgd+__pgd_offset(address)) +#define pgd_index(address) ((address >> PGDIR_SHIFT) & PTRS_PER_PGD) +#define __pgd_offset(address) pgd_index(address) +#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address)) /* Find an entry in the second-level page table.. */ extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) diff --git a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h index e342d9bd0..c189b6569 100644 --- a/include/asm-alpha/smp.h +++ b/include/asm-alpha/smp.h @@ -20,6 +20,7 @@ __hard_smp_processor_id(void) #ifdef __SMP__ #include <linux/threads.h> +#include <asm/irq.h> struct cpuinfo_alpha { unsigned long loops_per_sec; @@ -28,6 +29,8 @@ struct cpuinfo_alpha { unsigned long *pte_cache; unsigned long pgtable_cache_sz; unsigned long ipi_count; + unsigned long irq_attempt[NR_IRQS]; + unsigned long smp_local_irq_count; unsigned long prof_multiplier; unsigned long prof_counter; int irq_count, bh_count; |