diff options
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/floppy.h | 4 | ||||
-rw-r--r-- | include/asm-i386/io.h | 20 | ||||
-rw-r--r-- | include/asm-i386/page.h | 14 | ||||
-rw-r--r-- | include/asm-i386/pci.h | 34 | ||||
-rw-r--r-- | include/asm-i386/pgtable.h | 13 | ||||
-rw-r--r-- | include/asm-i386/processor.h | 12 |
6 files changed, 74 insertions, 23 deletions
diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h index b941776f5..04a41eb58 100644 --- a/include/asm-i386/floppy.h +++ b/include/asm-i386/floppy.h @@ -190,7 +190,7 @@ static int fd_request_irq(void) static unsigned long dma_mem_alloc(unsigned long size) { - return __get_dma_pages(GFP_KERNEL,__get_order(size)); + return __get_dma_pages(GFP_KERNEL,get_order(size)); } @@ -207,7 +207,7 @@ static void _fd_dma_mem_free(unsigned long addr, unsigned long size) if((unsigned int) addr >= (unsigned int) high_memory) return vfree((void *)addr); else - free_pages(addr, __get_order(size)); + free_pages(addr, get_order(size)); } #define fd_dma_mem_free(addr, size) _fd_dma_mem_free(addr, size) diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index 4ec380c2d..7a4e9facc 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h @@ -195,15 +195,15 @@ extern void iounmap(void *addr); */ #define __ISA_IO_base ((char *)(PAGE_OFFSET)) -#define isa_readb(a) readb(__ISA_IO_base + (unsigned long)(a)) -#define isa_readw(a) readw(__ISA_IO_base + (unsigned long)(a)) -#define isa_readl(a) readl(__ISA_IO_base + (unsigned long)(a)) -#define isa_writeb(b,a) writeb(b,__ISA_IO_base + (unsigned long)(a)) -#define isa_writew(w,a) writew(w,__ISA_IO_base + (unsigned long)(a)) -#define isa_writel(l,a) writel(l,__ISA_IO_base + (unsigned long)(a)) -#define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (unsigned long)(a),(b),(c)) -#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (unsigned long)(b),(c)) -#define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (unsigned long)(a),(b),(c)) +#define isa_readb(a) readb(__ISA_IO_base + (a)) +#define isa_readw(a) readw(__ISA_IO_base + (a)) +#define isa_readl(a) readl(__ISA_IO_base + (a)) +#define isa_writeb(b,a) writeb(b,__ISA_IO_base + (a)) +#define isa_writew(w,a) writew(w,__ISA_IO_base + (a)) +#define isa_writel(l,a) writel(l,__ISA_IO_base + (a)) +#define isa_memset_io(a,b,c) memset_io(__ISA_IO_base + (a),(b),(c)) +#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a),__ISA_IO_base + (b),(c)) +#define isa_memcpy_toio(a,b,c) memcpy_toio(__ISA_IO_base + (a),(b),(c)) /* @@ -211,7 +211,7 @@ extern void iounmap(void *addr); */ #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(b),(c),(d)) -#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(__ISA_IO_base + (unsigned long)(b)),(c),(d)) +#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),__io_virt(__ISA_IO_base + (b)),(c),(d)) static inline int check_signature(unsigned long io_addr, const unsigned char *signature, int length) diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index 67855d163..9e159523a 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h @@ -94,6 +94,20 @@ extern int console_loglevel; BUG(); \ } while (0) +/* 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__ */ #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h index 8cc99dda0..1e55ec60f 100644 --- a/include/asm-i386/pci.h +++ b/include/asm-i386/pci.h @@ -52,8 +52,10 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size, * until either pci_unmap_single or pci_dma_sync_single is performed. */ extern inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, - size_t size) + size_t size, int direction) { + if (direction == PCI_DMA_NONE) + BUG(); return virt_to_bus(ptr); } @@ -65,8 +67,10 @@ extern inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, * whatever the device wrote there. */ extern inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, - size_t size) + size_t size, int direction) { + if (direction == PCI_DMA_NONE) + BUG(); /* Nothing to do */ } @@ -86,8 +90,10 @@ extern inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, * the same here. */ extern inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, - int nents) + int nents, int direction) { + if (direction == PCI_DMA_NONE) + BUG(); return nents; } @@ -96,8 +102,10 @@ extern inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, * pci_unmap_single() above. */ extern inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, - int nents) + int nents, int direction) { + if (direction == PCI_DMA_NONE) + BUG(); /* Nothing to do */ } @@ -112,8 +120,10 @@ extern inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, */ extern inline void pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t dma_handle, - size_t size) + size_t size, int direction) { + if (direction == PCI_DMA_NONE) + BUG(); /* Nothing to do */ } @@ -125,11 +135,23 @@ extern inline void pci_dma_sync_single(struct pci_dev *hwdev, */ extern inline void pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg, - int nelems) + int nelems, int direction) { + if (direction == PCI_DMA_NONE) + BUG(); /* 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; +} + /* These macros should be used after a pci_map_sg call has been done * to get bus addresses of each of the SG entries and their lengths. * You should only work with the number of sg entries pci_map_sg diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index ef491587f..f0d1b00bf 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -26,6 +26,7 @@ extern pgd_t swapper_pg_dir[1024]; #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) +#define flush_icache_page(vma,pg) do { } while (0) #define __flush_tlb() \ do { \ @@ -51,7 +52,7 @@ extern pgd_t swapper_pg_dir[1024]; "movl %%cr3, %0; # flush TLB \n" \ "movl %0, %%cr3; \n" \ "movl %2, %%cr4; # turn PGE back on \n" \ - : "=r" (tmpreg) \ + : "=&r" (tmpreg) \ : "r" (mmu_cr4_features & ~X86_CR4_PGE), \ "r" (mmu_cr4_features) \ : "memory"); \ @@ -129,7 +130,8 @@ extern unsigned long empty_zero_page[1024]; * area for the same reason. ;) */ #define VMALLOC_OFFSET (8*1024*1024) -#define VMALLOC_START (((unsigned long) high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) +#define VMALLOC_START (((unsigned long) high_memory + 2*VMALLOC_OFFSET-1) & \ + ~(VMALLOC_OFFSET-1)) #define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (FIXADDR_START) @@ -292,10 +294,11 @@ extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) /* to find an entry in a page-table-directory. */ -#define __pgd_offset(address) \ - ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) +#define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) + +#define __pgd_offset(address) pgd_index(address) -#define pgd_offset(mm, address) ((mm)->pgd+__pgd_offset(address)) +#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address)) /* to find an entry in a kernel page-table-directory */ #define pgd_offset_k(address) pgd_offset(&init_mm, address) diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index e5ccac281..1a4c151cd 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -419,4 +419,16 @@ unsigned long get_wchan(struct task_struct *p); #define init_task (init_task_union.task) #define init_stack (init_task_union.stack) +struct microcode { + unsigned int hdrver; + unsigned int rev; + unsigned int date; + unsigned int sig; + unsigned int cksum; + unsigned int ldrver; + unsigned int pf; + unsigned int reserved[5]; + unsigned int bits[500]; +}; + #endif /* __ASM_I386_PROCESSOR_H */ |