1
0
Fork 0

um: a bunch of headers can be killed by using generic-y

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
wifi-calibration
Al Viro 2012-01-30 16:32:09 -05:00 committed by Richard Weinberger
parent 69a3b4b28e
commit d3985d9ac6
7 changed files with 1 additions and 124 deletions

View File

@ -1,3 +1,3 @@
generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h
generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h
generic-y += ftrace.h
generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h

View File

@ -1,13 +0,0 @@
/*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/
#ifndef __UM_CURRENT_H
#define __UM_CURRENT_H
#include "linux/thread_info.h"
#define current (current_thread_info()->task)
#endif

View File

@ -1,18 +0,0 @@
#ifndef __UM_DELAY_H
#define __UM_DELAY_H
/* Undefined on purpose */
extern void __bad_udelay(void);
extern void __bad_ndelay(void);
extern void __udelay(unsigned long usecs);
extern void __ndelay(unsigned long usecs);
extern void __delay(unsigned long loops);
#define udelay(n) ((__builtin_constant_p(n) && (n) > 20000) ? \
__bad_udelay() : __udelay(n))
#define ndelay(n) ((__builtin_constant_p(n) && (n) > 20000) ? \
__bad_ndelay() : __ndelay(n))
#endif

View File

@ -1,57 +0,0 @@
#ifndef __UM_IO_H
#define __UM_IO_H
#include "asm/page.h"
#define IO_SPACE_LIMIT 0xdeadbeef /* Sure hope nothing uses this */
static inline int inb(unsigned long i) { return(0); }
static inline void outb(char c, unsigned long i) { }
/*
* Change virtual addresses to physical addresses and vv.
* These are pretty trivial
*/
static inline unsigned long virt_to_phys(volatile void * address)
{
return __pa((void *) address);
}
static inline void * phys_to_virt(unsigned long address)
{
return __va(address);
}
/*
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
* access
*/
#define xlate_dev_mem_ptr(p) __va(p)
/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p
static inline void writeb(unsigned char b, volatile void __iomem *addr)
{
*(volatile unsigned char __force *) addr = b;
}
static inline void writew(unsigned short b, volatile void __iomem *addr)
{
*(volatile unsigned short __force *) addr = b;
}
static inline void writel(unsigned int b, volatile void __iomem *addr)
{
*(volatile unsigned int __force *) addr = b;
}
static inline void writeq(unsigned int b, volatile void __iomem *addr)
{
*(volatile unsigned long long __force *) addr = b;
}
#define __raw_writeb writeb
#define __raw_writew writew
#define __raw_writel writel
#define __raw_writeq writeq
#endif

View File

@ -1,9 +0,0 @@
/*
* Pull in the generic implementation for the mutex fastpath.
*
* TODO: implement optimized primitives instead, or leave the generic
* implementation in place, or pick the atomic_xchg() based generic
* implementation. (see asm-generic/mutex-xchg.h for details)
*/
#include <asm-generic/mutex-dec.h>

View File

@ -1,20 +0,0 @@
#ifndef _UM_PARAM_H
#define _UM_PARAM_H
#define EXEC_PAGESIZE 4096
#ifndef NOGROUP
#define NOGROUP (-1)
#endif
#define MAXHOSTNAMELEN 64 /* max length of hostname */
#ifdef __KERNEL__
#define HZ CONFIG_HZ
#define USER_HZ 100 /* .. some user interfaces are in "ticks" */
#define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */
#else
#define HZ 100
#endif
#endif

View File

@ -1,6 +0,0 @@
#ifndef __UM_PCI_H
#define __UM_PCI_H
#define PCI_DMA_BUS_IS_PHYS (1)
#endif