diff options
Diffstat (limited to 'include')
33 files changed, 318 insertions, 788 deletions
diff --git a/include/asm-arm26/cache.h b/include/asm-arm26/cache.h index d95112e028a6..f52ca1b808cd 100644 --- a/include/asm-arm26/cache.h +++ b/include/asm-arm26/cache.h @@ -8,12 +8,4 @@ #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) #define SMP_CACHE_BYTES L1_CACHE_BYTES -#ifdef MODULE -#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) -#else -#define __cacheline_aligned \ - __attribute__((__aligned__(L1_CACHE_BYTES), \ - __section__(".data.cacheline_aligned"))) -#endif - #endif diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 4b1870a784cb..0d8d6d5a6757 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h @@ -655,24 +655,13 @@ ia64_get_dbr (__u64 regnum) return retval; } -/* XXX remove the handcoded version once we have a sufficiently clever compiler... */ -#ifdef SMART_COMPILER -# define ia64_rotr(w,n) \ - ({ \ - __u64 __ia64_rotr_w = (w), _n = (n); \ - \ - (__ia64_rotr_w >> _n) | (__ia64_rotr_w << (64 - _n)); \ - }) -#else -# define ia64_rotr(w,n) \ - ({ \ - __u64 __ia64_rotr_w; \ - __ia64_rotr_w = ia64_shrp((w), (w), (n)); \ - __ia64_rotr_w; \ - }) -#endif +static inline __u64 +ia64_rotr (__u64 w, __u64 n) +{ + return (w >> n) | (w << (64 - n)); +} -#define ia64_rotl(w,n) ia64_rotr((w),(64)-(n)) +#define ia64_rotl(w,n) ia64_rotr((w), (64) - (n)) /* * Take a mapped kernel address and return the equivalent address diff --git a/include/asm-ia64/sn/pci/pcibr.h b/include/asm-ia64/sn/pci/pcibr.h index f65ac2817010..c46911ae6415 100644 --- a/include/asm-ia64/sn/pci/pcibr.h +++ b/include/asm-ia64/sn/pci/pcibr.h @@ -325,9 +325,27 @@ extern int pcibr_asic_rev(vertex_hdl_t); #define PCIBR 'p' #define _PCIBR(x) ((PCIBR << 8) | (x)) -#define PCIBR_SLOT_STARTUP _PCIBR(1) -#define PCIBR_SLOT_SHUTDOWN _PCIBR(2) -#define PCIBR_SLOT_QUERY _PCIBR(3) +/* + * Bit defintions for variable slot_status in struct + * pcibr_soft_slot_s. They are here so that the user + * hot-plug utility can interpret the slot's power + * status. + */ +#ifdef CONFIG_HOTPLUG_PCI_SGI +#define PCI_SLOT_ENABLE_CMPLT 0x01 +#define PCI_SLOT_ENABLE_INCMPLT 0x02 +#define PCI_SLOT_DISABLE_CMPLT 0x04 +#define PCI_SLOT_DISABLE_INCMPLT 0x08 +#define PCI_SLOT_POWER_ON 0x10 +#define PCI_SLOT_POWER_OFF 0x20 +#define PCI_SLOT_IS_SYS_CRITICAL 0x40 +#define PCI_SLOT_PCIBA_LOADED 0x80 + +#define PCI_SLOT_STATUS_MASK (PCI_SLOT_ENABLE_CMPLT | \ + PCI_SLOT_ENABLE_INCMPLT | \ + PCI_SLOT_DISABLE_CMPLT | \ + PCI_SLOT_DISABLE_INCMPLT) +#define PCI_SLOT_POWER_MASK (PCI_SLOT_POWER_ON | PCI_SLOT_POWER_OFF) /* * Bit defintions for variable slot_status in struct @@ -356,26 +374,20 @@ extern int pcibr_asic_rev(vertex_hdl_t); #define FUNC_IS_SYS_CRITICAL 0x02 /* - * Structures for requesting PCI bridge information and receiving a response + * L1 slot power operations for PCI hot-plug */ -typedef struct pcibr_slot_req_s *pcibr_slot_req_t; -typedef struct pcibr_slot_up_resp_s *pcibr_slot_up_resp_t; -typedef struct pcibr_slot_down_resp_s *pcibr_slot_down_resp_t; -typedef struct pcibr_slot_info_resp_s *pcibr_slot_info_resp_t; -typedef struct pcibr_slot_func_info_resp_s *pcibr_slot_func_info_resp_t; +#define PCI_REQ_SLOT_POWER_ON 1 +#define PCI_L1_QSIZE 128 /* our L1 message buffer size */ + #define L1_QSIZE 128 /* our L1 message buffer size */ -struct pcibr_slot_req_s { - int req_slot; - union { - pcibr_slot_up_resp_t up; - pcibr_slot_down_resp_t down; - pcibr_slot_info_resp_t query; - void *any; - } req_respp; - int req_size; + +enum pcibr_slot_disable_action_e { + PCI_REQ_SLOT_ELIGIBLE, + PCI_REQ_SLOT_DISABLE }; + struct pcibr_slot_up_resp_s { int resp_sub_errno; char resp_l1_msg[L1_QSIZE + 1]; @@ -444,6 +456,45 @@ struct pcibr_slot_info_resp_s { } resp_func[8]; }; +struct pcibr_slot_req_s { + int req_slot; + union { + enum pcibr_slot_disable_action_e up; + struct pcibr_slot_down_resp_s *down; + struct pcibr_slot_info_resp_s *query; + void *any; + } req_respp; + int req_size; +}; + +struct pcibr_slot_enable_resp_s { + int resp_sub_errno; + char resp_l1_msg[PCI_L1_QSIZE + 1]; +}; + +struct pcibr_slot_disable_resp_s { + int resp_sub_errno; + char resp_l1_msg[PCI_L1_QSIZE + 1]; +}; + +struct pcibr_slot_enable_req_s { + pciio_slot_t req_device; + struct pcibr_slot_enable_resp_s req_resp; +}; + +struct pcibr_slot_disable_req_s { + pciio_slot_t req_device; + enum pcibr_slot_disable_action_e req_action; + struct pcibr_slot_disable_resp_s req_resp; +}; + +struct pcibr_slot_info_req_s { + pciio_slot_t req_device; + struct pcibr_slot_info_resp_s req_resp; +}; + +#endif /* CONFIG_HOTPLUG_PCI_SGI */ + /* * PCI specific errors, interpreted by pciconfig command diff --git a/include/asm-ia64/sn/pci/pcibr_private.h b/include/asm-ia64/sn/pci/pcibr_private.h index 0bd907d74c58..bd9b395390ec 100644 --- a/include/asm-ia64/sn/pci/pcibr_private.h +++ b/include/asm-ia64/sn/pci/pcibr_private.h @@ -475,6 +475,12 @@ struct pcibr_soft_s { vertex_hdl_t bs_noslot_conn; /* NO-SLOT connection point */ pcibr_info_t bs_noslot_info; + +#ifdef CONFIG_HOTPLUG_PCI_SGI + /* Linux PCI bus structure pointer */ + struct pci_bus *bs_pci_bus; +#endif + struct pcibr_soft_slot_s { /* information we keep about each CFG slot */ @@ -492,9 +498,14 @@ struct pcibr_soft_s { pciio_slot_t host_slot; vertex_hdl_t slot_conn; +#ifdef CONFIG_HOTPLUG_PCI_SGI /* PCI Hot-Plug status word */ int slot_status; + /* PCI Hot-Plug core structure pointer */ + struct hotplug_slot *bss_hotplug_slot; +#endif /* CONFIG_HOTPLUG_PCI_SGI */ + /* Potentially several connection points * for this slot. bss_ninfo is how many, * and bss_infos is a pointer to diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 287a168f526e..906c7c8d0ef4 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h @@ -58,6 +58,7 @@ #define SN_SAL_MEMPROTECT 0x0200003e #define SN_SAL_SYSCTL_FRU_CAPTURE 0x0200003f +#define SN_SAL_SYSCTL_IOBRICK_PCI_OP 0x02000042 // reentrant /* * Service-specific constants @@ -72,6 +73,16 @@ #define SAL_CONSOLE_INTR_XMIT 1 /* output interrupt */ #define SAL_CONSOLE_INTR_RECV 2 /* input interrupt */ +#ifdef CONFIG_HOTPLUG_PCI_SGI +/* power up / power down / reset a PCI slot or bus */ +#define SAL_SYSCTL_PCI_POWER_UP 0 +#define SAL_SYSCTL_PCI_POWER_DOWN 1 +#define SAL_SYSCTL_PCI_RESET 2 + +/* what type of I/O brick? */ +#define SAL_SYSCTL_IO_XTALK 0 /* connected via a compute node */ + +#endif /* CONFIG_HOTPLUG_PCI_SGI */ /* * SN_SAL_GET_PARTITION_ADDR return constants @@ -641,4 +652,22 @@ ia64_sn_fru_capture(void) return isrv.v0; } +/* + * Performs an operation on a PCI bus or slot -- power up, power down + * or reset. + */ +static inline u64 +ia64_sn_sysctl_iobrick_pci_op(nasid_t n, u64 connection_type, + u64 bus, slotid_t slot, + u64 action) +{ + struct ia64_sal_retval rv = {0, 0, 0, 0}; + + SAL_CALL_NOLOCK(rv, SN_SAL_SYSCTL_IOBRICK_PCI_OP, connection_type, n, action, + bus, (u64) slot, 0, 0); + if (rv.status) + return rv.v0; + return 0; +} + #endif /* _ASM_IA64_SN_SN_SAL_H */ diff --git a/include/asm-m68knommu/machdep.h b/include/asm-m68knommu/machdep.h index 697d878b3aaf..5a9f9c297f79 100644 --- a/include/asm-m68knommu/machdep.h +++ b/include/asm-m68knommu/machdep.h @@ -2,6 +2,7 @@ #define _M68KNOMMU_MACHDEP_H #include <linux/seq_file.h> +#include <linux/interrupt.h> struct pt_regs; struct kbd_repeat; @@ -10,14 +11,14 @@ struct hwclk_time; struct gendisk; struct buffer_head; -extern void (*mach_sched_init) (void (*handler)(int, void *, struct pt_regs *)); +extern void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)); /* machine dependent keyboard functions */ extern int (*mach_keyb_init) (void); extern int (*mach_kbdrate) (struct kbd_repeat *); extern void (*mach_kbd_leds) (unsigned int); /* machine dependent irq functions */ extern void (*mach_init_IRQ) (void); -extern void (*(*mach_default_handler)[]) (int, void *, struct pt_regs *); +extern irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *); extern int (*mach_request_irq) (unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id); extern void (*mach_free_irq) (unsigned int irq, void *dev_id); diff --git a/include/asm-ppc/cache.h b/include/asm-ppc/cache.h index 6a3f4c05dc67..1fcf0f3e7b87 100644 --- a/include/asm-ppc/cache.h +++ b/include/asm-ppc/cache.h @@ -30,14 +30,6 @@ #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) #define L1_CACHE_PAGES 8 -#ifdef MODULE -#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) -#else -#define __cacheline_aligned \ - __attribute__((__aligned__(L1_CACHE_BYTES), \ - __section__(".data.cacheline_aligned"))) -#endif - #ifndef __ASSEMBLY__ extern void clean_dcache_range(unsigned long start, unsigned long stop); extern void flush_dcache_range(unsigned long start, unsigned long stop); diff --git a/include/asm-s390/byteorder.h b/include/asm-s390/byteorder.h index 43b0645bacd8..91a6f3893bcd 100644 --- a/include/asm-s390/byteorder.h +++ b/include/asm-s390/byteorder.h @@ -67,7 +67,7 @@ static __inline__ __u32 ___arch__swab32(__u32 x) __asm__ __volatile__ ( " lrvr %0,%1" - : "=d" (result) : "d" (x), "m" (x) ); + : "=d" (result) : "d" (x) ); return result; #endif /* __s390x__ */ } diff --git a/include/asm-s390/ccwgroup.h b/include/asm-s390/ccwgroup.h index 373160d73160..d626676ddf08 100644 --- a/include/asm-s390/ccwgroup.h +++ b/include/asm-s390/ccwgroup.h @@ -10,6 +10,7 @@ struct ccwgroup_device { CCWGROUP_OFFLINE, CCWGROUP_ONLINE, } state; + atomic_t onoff; unsigned int count; /* number of attached slave devices */ struct device dev; /* master device */ struct ccw_device *cdev[0]; /* variable number, allocate as needed */ diff --git a/include/asm-s390/cmb.h b/include/asm-s390/cmb.h new file mode 100644 index 000000000000..1bfe2bd630b5 --- /dev/null +++ b/include/asm-s390/cmb.h @@ -0,0 +1,98 @@ +#ifndef S390_CMB_H +#define S390_CMB_H +/** + * struct cmbdata -- channel measurement block data for user space + * + * @size: size of the stored data + * @ssch_rsch_count: XXX + * @sample_count: + * @device_connect_time: + * @function_pending_time: + * @device_disconnect_time: + * @control_unit_queuing_time: + * @device_active_only_time: + * @device_busy_time: + * @initial_command_response_time: + * + * all values are stored as 64 bit for simplicity, especially + * in 32 bit emulation mode. All time values are normalized to + * nanoseconds. + * Currently, two formats are known, which differ by the size of + * this structure, i.e. the last two members are only set when + * the extended channel measurement facility (first shipped in + * z990 machines) is activated. + * Potentially, more fields could be added, which results in a + * new ioctl number. + **/ +struct cmbdata { + __u64 size; + __u64 elapsed_time; + /* basic and exended format: */ + __u64 ssch_rsch_count; + __u64 sample_count; + __u64 device_connect_time; + __u64 function_pending_time; + __u64 device_disconnect_time; + __u64 control_unit_queuing_time; + __u64 device_active_only_time; + /* extended format only: */ + __u64 device_busy_time; + __u64 initial_command_response_time; +}; + +/* enable channel measurement */ +#define BIODASDCMFENABLE _IO(DASD_IOCTL_LETTER,32) +/* enable channel measurement */ +#define BIODASDCMFDISABLE _IO(DASD_IOCTL_LETTER,33) +/* reset channel measurement block */ +#define BIODASDRESETCMB _IO(DASD_IOCTL_LETTER,34) +/* read channel measurement data */ +#define BIODASDREADCMB _IOWR(DASD_IOCTL_LETTER,32,u64) +/* read channel measurement data */ +#define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata) + +#ifdef __KERNEL__ + +/** + * enable_cmf() - switch on the channel measurement for a specific device + * @cdev: The ccw device to be enabled + * returns 0 for success or a negative error value. + * + * Context: + * non-atomic + **/ +extern int enable_cmf(struct ccw_device *cdev); + +/** + * disable_cmf() - switch off the channel measurement for a specific device + * @cdev: The ccw device to be disabled + * returns 0 for success or a negative error value. + * + * Context: + * non-atomic + **/ +extern int disable_cmf(struct ccw_device *cdev); + +/** + * cmf_read() - read one value from the current channel measurement block + * @cmf: the channel to be read + * @index: the name of the value that is read + * + * Context: + * any + **/ + +extern u64 cmf_read(struct ccw_device *cdev, int index); +/** + * cmf_readall() - read one value from the current channel measurement block + * @cmf: the channel to be read + * @data: a pointer to a data block that will be filled + * + * Context: + * any + **/ +extern int cmf_readall(struct ccw_device *cdev, struct cmbdata*data); +extern void cmf_reset(struct ccw_device *cdev); + +#endif /* __KERNEL__ */ +#endif /* S390_CMB_H */ diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 2b3964b86283..c266fe9fa0aa 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h @@ -35,11 +35,7 @@ struct __debug_entry{ #ifdef __KERNEL__ #include <linux/version.h> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)) - #include <asm/spinlock.h> -#else - #include <linux/spinlock.h> -#endif /* LINUX_VERSION_CODE */ +#include <linux/spinlock.h> #include <linux/kernel.h> #include <linux/time.h> #include <linux/proc_fs.h> diff --git a/include/asm-s390/dma-mapping.h b/include/asm-s390/dma-mapping.h index e60fba436834..87edaa9531b3 100644 --- a/include/asm-s390/dma-mapping.h +++ b/include/asm-s390/dma-mapping.h @@ -8,4 +8,18 @@ #ifndef _ASM_DMA_MAPPING_H #define _ASM_DMA_MAPPING_H + +static inline void *dma_alloc_coherent(struct device *dev, size_t size, + dma_addr_t *dma_handle, int flag) +{ + BUG(); + return 0; +} + +static inline void dma_free_coherent(struct device *dev, size_t size, + void *vaddr, dma_addr_t dma_handle) +{ + BUG(); +} + #endif /* _ASM_DMA_MAPPING_H */ diff --git a/include/asm-s390/extmem.h b/include/asm-s390/extmem.h new file mode 100644 index 000000000000..3a145e182fb1 --- /dev/null +++ b/include/asm-s390/extmem.h @@ -0,0 +1,19 @@ +/* + * include/asm-s390x/extmem.h + * + * definitions for external memory segment support + * Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation + */ + +#ifndef _ASM_S390X_DCSS_H +#define _ASM_S390X_DCSS_H +#ifndef __ASSEMBLY__ +#define SEGMENT_SHARED_RW 0 +#define SEGMENT_SHARED_RO 1 +#define SEGMENT_EXCLUSIVE_RW 2 +#define SEGMENT_EXCLUSIVE_RO 3 +extern int segment_load (char *name,int segtype,unsigned long *addr,unsigned long *length); +extern void segment_unload(char *name); +extern void segment_replace(char *name); +#endif +#endif diff --git a/include/asm-s390/idals.h b/include/asm-s390/idals.h index 890bc145f9dd..ad444dc74b9b 100644 --- a/include/asm-s390/idals.h +++ b/include/asm-s390/idals.h @@ -228,7 +228,7 @@ idal_buffer_to_user(struct idal_buffer *ib, void *to, size_t count) left = copy_to_user(to, ib->data[i], IDA_BLOCK_SIZE); if (left) return left + count - IDA_BLOCK_SIZE; - (addr_t) to += IDA_BLOCK_SIZE; + to = (void *) to + IDA_BLOCK_SIZE; count -= IDA_BLOCK_SIZE; } return copy_to_user(to, ib->data[i], count); @@ -248,7 +248,7 @@ idal_buffer_from_user(struct idal_buffer *ib, const void *from, size_t count) left = copy_from_user(ib->data[i], from, IDA_BLOCK_SIZE); if (left) return left + count - IDA_BLOCK_SIZE; - (addr_t) from += IDA_BLOCK_SIZE; + from = (void *) from + IDA_BLOCK_SIZE; count -= IDA_BLOCK_SIZE; } return copy_from_user(ib->data[i], from, count); diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 39697ffa96f0..ec34d58cf463 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h @@ -21,6 +21,8 @@ #define check_pgt_cache() do {} while (0) +extern void diag10(unsigned long addr); + /* * Allocate and free page tables. The xxx_kernel() versions are * used to allocate a kernel page table - this turns on ASN bits diff --git a/include/asm-s390/qdio.h b/include/asm-s390/qdio.h index 5e8eee3ed6b0..0ddf0a8ef8de 100644 --- a/include/asm-s390/qdio.h +++ b/include/asm-s390/qdio.h @@ -17,6 +17,7 @@ #include <linux/interrupt.h> #include <asm/cio.h> +#include <asm/ccwdev.h> #define QDIO_NAME "qdio " diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index 1b9e99a994ee..7e613240088e 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h @@ -29,6 +29,9 @@ typedef struct __u16 cpu; } sigp_info; +extern int smp_call_function_on(void (*func) (void *info), void *info, + int nonatomic, int wait, int cpu); + extern cpumask_t cpu_online_map; extern cpumask_t cpu_possible_map; @@ -61,4 +64,9 @@ extern __inline__ __u16 hard_smp_processor_id(void) #define cpu_logical_map(cpu) (cpu) #endif + +#ifndef CONFIG_SMP +#define smp_call_function_on(func,info,nonatomic,wait,cpu) ({ 0; }) +#endif + #endif diff --git a/include/asm-s390/timer.h b/include/asm-s390/timer.h new file mode 100644 index 000000000000..bb49c6999055 --- /dev/null +++ b/include/asm-s390/timer.h @@ -0,0 +1,50 @@ +/* + * include/asm-s390/timer.h + * + * (C) Copyright IBM Corp. 2003 + * Virtual CPU timer + * + * Author: Jan Glauber (jang@de.ibm.com) + */ + +#ifndef _ASM_S390_TIMER_H +#define _ASM_S390_TIMER_H + +#include <linux/timer.h> + +#define VTIMER_MAX_SLICE (0x7ffffffffffff000LL) + +struct vtimer_list { + struct list_head entry; + + int cpu; + __u64 expires; + __u64 interval; + + spinlock_t lock; + unsigned long magic; + + void (*function)(unsigned long, struct pt_regs*); + unsigned long data; +}; + +/* the offset value will wrap after ca. 71 years */ +struct vtimer_queue { + struct list_head list; + spinlock_t lock; + __u64 to_expire; /* current event expire time */ + __u64 offset; /* list offset to zero */ + __u64 idle; /* temp var for idle */ +}; + +void set_vtimer(__u64 expires); + +extern void init_virt_timer(struct vtimer_list *timer); +extern void add_virt_timer(void *new); +extern void add_virt_timer_periodic(void *new); +extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires); +extern int del_virt_timer(struct vtimer_list *timer); + +int stop_timers(void); + +#endif diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 1c70b1c69754..0b364bd416ae 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h @@ -533,7 +533,6 @@ static inline _syscall1(int,dup,int,fd) static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) static inline _syscall3(int,open,const char *,file,int,flag,int,mode) static inline _syscall1(int,close,int,fd) -static inline _syscall1(int,_exit,int,exitcode) static inline _syscall2(long,stat,char *,filename,struct stat *,statbuf) static inline pid_t waitpid(int pid, int *wait_stat, int flags) diff --git a/include/asm-sh/cache.h b/include/asm-sh/cache.h index f8cf61f9869a..9decb1ced217 100644 --- a/include/asm-sh/cache.h +++ b/include/asm-sh/cache.h @@ -21,14 +21,6 @@ #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) -#ifdef MODULE -#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) -#else -#define __cacheline_aligned \ - __attribute__((__aligned__(L1_CACHE_BYTES), \ - __section__(".data.cacheline_aligned"))) -#endif - #define L1_CACHE_SHIFT_MAX 5 /* largest L1 which this arch supports */ struct cache_info { diff --git a/include/asm-sparc/cache.h b/include/asm-sparc/cache.h index 86fd491b42a6..e6316fd7e1a4 100644 --- a/include/asm-sparc/cache.h +++ b/include/asm-sparc/cache.h @@ -17,14 +17,6 @@ #define SMP_CACHE_BYTES 32 -#ifdef MODULE -#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) -#else -#define __cacheline_aligned \ - __attribute__((__aligned__(SMP_CACHE_BYTES), \ - __section__(".data.cacheline_aligned"))) -#endif - /* Direct access to the instruction cache is provided through and * alternate address space. The IDC bit must be off in the ICCR on * HyperSparcs for these accesses to work. The code below does not do diff --git a/include/asm-sparc64/cache.h b/include/asm-sparc64/cache.h index c4ba581b7af1..ade5ec3bfd5a 100644 --- a/include/asm-sparc64/cache.h +++ b/include/asm-sparc64/cache.h @@ -14,12 +14,4 @@ #define SMP_CACHE_BYTES_SHIFT 6 #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */ -#ifdef MODULE -#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) -#else -#define __cacheline_aligned \ - __attribute__((__aligned__(SMP_CACHE_BYTES), \ - __section__(".data.cacheline_aligned"))) -#endif - #endif diff --git a/include/linux/cache.h b/include/linux/cache.h index 3db3832f35cb..4d767b93738a 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -26,13 +26,9 @@ #endif #ifndef __cacheline_aligned -#ifdef MODULE -#define __cacheline_aligned ____cacheline_aligned -#else #define __cacheline_aligned \ __attribute__((__aligned__(SMP_CACHE_BYTES), \ __section__(".data.cacheline_aligned"))) -#endif #endif /* __cacheline_aligned */ #ifndef __cacheline_aligned_in_smp diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 6727f422da61..09a4286fb02b 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h @@ -81,9 +81,11 @@ typedef enum { struct video_event { int32_t type; #define VIDEO_EVENT_SIZE_CHANGED 1 +#define VIDEO_EVENT_FRAME_RATE_CHANGED 2 time_t timestamp; union { video_size_t size; + unsigned int frame_rate; /* in frames per 1000sec */ } u; }; @@ -194,6 +196,7 @@ typedef uint16_t video_attributes_t; #define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t) #define VIDEO_SET_ATTRIBUTES _IO('o', 53) #define VIDEO_GET_SIZE _IOR('o', 55, video_size_t) +#define VIDEO_GET_FRAME_RATE _IOR('o', 56, unsigned int) #endif /*_DVBVIDEO_H_*/ diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 416017dc3927..462f7234695f 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h @@ -38,12 +38,6 @@ extern int eth_header_cache(struct neighbour *neigh, struct hh_cache *hh); extern int eth_header_parse(struct sk_buff *skb, unsigned char *haddr); -extern struct net_device *__init_etherdev(struct net_device *dev, int sizeof_priv); -static inline struct net_device *init_etherdev(struct net_device *dev, - int sizeof_priv) -{ - return __init_etherdev(dev, sizeof_priv); -} extern struct net_device *alloc_etherdev(int sizeof_priv); static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base) diff --git a/include/linux/hfs_fs.h b/include/linux/hfs_fs.h deleted file mode 100644 index 6cddc472d859..000000000000 --- a/include/linux/hfs_fs.h +++ /dev/null @@ -1,348 +0,0 @@ -/* - * linux/include/linux/hfs_fs.h - * - * Copyright (C) 1995-1997 Paul H. Hargrove - * This file may be distributed under the terms of the GNU General Public License. - * - * The source code distribution of the Columbia AppleTalk Package for - * UNIX, version 6.0, (CAP) was used as a specification of the - * location and format of files used by CAP's Aufs. No code from CAP - * appears in hfs_fs. hfs_fs is not a work ``derived'' from CAP in - * the sense of intellectual property law. - * - * The source code distributions of Netatalk, versions 1.3.3b2 and - * 1.4b2, were used as a specification of the location and format of - * files used by Netatalk's afpd. No code from Netatalk appears in - * hfs_fs. hfs_fs is not a work ``derived'' from Netatalk in the - * sense of intellectual property law. - */ - -#ifndef _LINUX_HFS_FS_H -#define _LINUX_HFS_FS_H - -#include <linux/hfs_sysdep.h> - -/* magic numbers for Apple Double header files */ -#define HFS_DBL_MAGIC 0x00051607 -#define HFS_SNGL_MAGIC 0x00051600 -#define HFS_HDR_VERSION_1 0x00010000 -#define HFS_HDR_VERSION_2 0x00020000 - -/* magic numbers for various internal structures */ -#define HFS_INO_MAGIC 0x4821 -#define HFS_SB_MAGIC 0x4822 - -/* The space used for the AppleDouble or AppleSingle headers */ -#define HFS_DBL_HDR_LEN 1024 - -/* The space used for the Netatalk header */ -#define HFS_NAT_HDR_LEN 1024 /* 589 for an exact match */ - -/* Macros to extract CNID and file "type" from the Linux inode number */ -#define HFS_CNID(X) ((X) & 0x3FFFFFFF) -#define HFS_ITYPE(X) ((X) & 0xC0000000) - -/* Macros to enumerate types */ -#define HFS_ITYPE_TO_INT(X) ((X) >> 30) -#define HFS_INT_TO_ITYPE(X) ((X) << 30) - -/* generic ITYPEs */ -#define HFS_ITYPE_0 0x00000000 -#define HFS_ITYPE_1 0x40000000 -#define HFS_ITYPE_2 0x80000000 -#define HFS_ITYPE_3 0xC0000000 -#define HFS_ITYPE_NORM HFS_ITYPE_0 /* "normal" directory or file */ - -/* ITYPEs for CAP */ -#define HFS_CAP_NORM HFS_ITYPE_0 /* data fork or normal directory */ -#define HFS_CAP_DATA HFS_ITYPE_0 /* data fork of file */ -#define HFS_CAP_NDIR HFS_ITYPE_0 /* normal directory */ -#define HFS_CAP_FNDR HFS_ITYPE_1 /* finder info for file or dir */ -#define HFS_CAP_RSRC HFS_ITYPE_2 /* resource fork of file */ -#define HFS_CAP_RDIR HFS_ITYPE_2 /* .resource directory */ -#define HFS_CAP_FDIR HFS_ITYPE_3 /* .finderinfo directory */ - -/* ITYPEs for Apple Double */ -#define HFS_DBL_NORM HFS_ITYPE_0 /* data fork or directory */ -#define HFS_DBL_DATA HFS_ITYPE_0 /* data fork of file */ -#define HFS_DBL_DIR HFS_ITYPE_0 /* directory */ -#define HFS_DBL_HDR HFS_ITYPE_1 /* AD header of file or dir */ - -/* ITYPEs for netatalk */ -#define HFS_NAT_NORM HFS_ITYPE_0 /* data fork or directory */ -#define HFS_NAT_DATA HFS_ITYPE_0 /* data fork of file */ -#define HFS_NAT_NDIR HFS_ITYPE_0 /* normal directory */ -#define HFS_NAT_HDR HFS_ITYPE_1 /* AD header of file or dir */ -#define HFS_NAT_HDIR HFS_ITYPE_2 /* directory holding AD headers */ - -/* ITYPEs for Apple Single */ -#define HFS_SGL_NORM HFS_ITYPE_0 /* AppleSingle file or directory */ -#define HFS_SGL_SNGL HFS_ITYPE_0 /* AppleSingle file */ -#define HFS_SGL_DIR HFS_ITYPE_0 /* directory */ -#define HFS_SGL_DINF HFS_ITYPE_1 /* %DirInfo for directory */ - -/* IDs for elements of an AppleDouble or AppleSingle header */ -#define HFS_HDR_DATA 1 /* data fork */ -#define HFS_HDR_RSRC 2 /* resource fork */ -#define HFS_HDR_FNAME 3 /* full (31-character) name */ -#define HFS_HDR_COMNT 4 /* comment */ -#define HFS_HDR_BWICN 5 /* b/w icon */ -#define HFS_HDR_CICON 6 /* color icon info */ -#define HFS_HDR_OLDI 7 /* old file info */ -#define HFS_HDR_DATES 8 /* file dates info */ -#define HFS_HDR_FINFO 9 /* Finder info */ -#define HFS_HDR_MACI 10 /* Macintosh info */ -#define HFS_HDR_PRODOSI 11 /* ProDOS info */ -#define HFS_HDR_MSDOSI 12 /* MSDOS info */ -#define HFS_HDR_SNAME 13 /* short name */ -#define HFS_HDR_AFPI 14 /* AFP file info */ -#define HFS_HDR_DID 15 /* directory id */ -#define HFS_HDR_MAX 16 - -/* - * There are three time systems. All three are based on seconds since - * a particular time/date. - * Unix: unsigned lil-endian since 00:00 GMT, Jan. 1, 1970 - * mac: unsigned big-endian since 00:00 GMT, Jan. 1, 1904 - * header: SIGNED big-endian since 00:00 GMT, Jan. 1, 2000 - * - */ -#define hfs_h_to_mtime(ARG) htonl((hfs_s32)ntohl(ARG)+3029529600U) -#define hfs_m_to_htime(ARG) ((hfs_s32)htonl(ntohl(ARG)-3029529600U)) -#define hfs_h_to_utime(ARG) ((hfs_s32)hfs_to_utc(ntohl(ARG)+946684800U)) -#define hfs_u_to_htime(ARG) ((hfs_s32)htonl(hfs_from_utc(ARG)-946684800U)) -#define hfs_u_to_mtime(ARG) htonl(hfs_from_utc(ARG)+2082844800U) -#define hfs_m_to_utime(ARG) (hfs_to_utc(ntohl(ARG)-2082844800U)) - -/*======== Data structures kept in memory ========*/ - -/* - * A descriptor for a single entry within the header of an - * AppleDouble or AppleSingle header file. - * An array of these make up a table of contents for the file. - */ -struct hfs_hdr_descr { - hfs_u32 id; /* The Apple assigned ID for the entry type */ - hfs_u32 offset; /* The offset to reach the entry */ - hfs_u32 length; /* The length of the entry */ -}; - -/* - * The info needed to reconstruct a given header layout - */ -struct hfs_hdr_layout { - hfs_u32 magic; /* AppleSingle or AppleDouble */ - hfs_u32 version; /* 0x00010000 or 0x00020000 */ - hfs_u16 entries; /* How many entries used */ - struct hfs_hdr_descr - descr[HFS_HDR_MAX]; /* Descriptors */ - struct hfs_hdr_descr - *order[HFS_HDR_MAX]; /* 'descr' ordered by offset */ -}; - -/* header layout for netatalk's v1 appledouble file format */ -struct hfs_nat_hdr { - hfs_lword_t magic; - hfs_lword_t version; - hfs_byte_t homefs[16]; - hfs_word_t entries; - hfs_byte_t descrs[12*5]; - hfs_byte_t real_name[255]; /* id=3 */ - hfs_byte_t comment[200]; /* id=4 XXX: not yet implemented */ - hfs_byte_t old_info[16]; /* id=7 */ - hfs_u8 finderinfo[32]; /* id=9 */ -}; - -/* - * Default header layout for Netatalk and AppleDouble - */ -struct hfs_dbl_hdr { - hfs_lword_t magic; - hfs_lword_t version; - hfs_byte_t filler[16]; - hfs_word_t entries; - hfs_byte_t descrs[12*HFS_HDR_MAX]; - hfs_byte_t real_name[255]; /* id=3 */ - hfs_byte_t comment[200]; /* id=4 XXX: not yet implemented */ - hfs_u32 create_time; /* \ */ - hfs_u32 modify_time; /* | id=8 (or 7) */ - hfs_u32 backup_time; /* | */ - hfs_u32 access_time; /* / (attributes with id=7) */ - hfs_u8 finderinfo[32]; /* id=9 */ - hfs_u32 fileinfo; /* id=10 */ - hfs_u32 cnid; /* id=15 */ - hfs_u8 short_name[12]; /* id=13 */ - hfs_u8 prodosi[8]; /* id=11 */ -}; - - -/* finder metadata for CAP */ -struct hfs_cap_info { - hfs_byte_t fi_fndr[32]; /* Finder's info */ - hfs_word_t fi_attr; /* AFP attributes (f=file/d=dir) */ -#define HFS_AFP_INV 0x001 /* Invisible bit (f/d) */ -#define HFS_AFP_EXPFOLDER 0x002 /* exported folder (d) */ -#define HFS_AFP_MULTI 0x002 /* Multiuser bit (f) */ -#define HFS_AFP_SYS 0x004 /* System bit (f/d) */ -#define HFS_AFP_DOPEN 0x008 /* data fork already open (f) */ -#define HFS_AFP_MOUNTED 0x008 /* mounted folder (d) */ -#define HFS_AFP_ROPEN 0x010 /* resource fork already open (f) */ -#define HFS_AFP_INEXPFOLDER 0x010 /* folder in shared area (d) */ -#define HFS_AFP_WRI 0x020 /* Write inhibit bit (readonly) (f) */ -#define HFS_AFP_BACKUP 0x040 /* backup needed bit (f/d) */ -#define HFS_AFP_RNI 0x080 /* Rename inhibit bit (f/d) */ -#define HFS_AFP_DEI 0x100 /* Delete inhibit bit (f/d) */ -#define HFS_AFP_NOCOPY 0x400 /* Copy protect bit (f) */ -#define HFS_AFP_RDONLY ( HFS_AFP_WRI|HFS_AFP_RNI|HFS_AFP_DEI) - hfs_byte_t fi_magic1; /* Magic number: */ -#define HFS_CAP_MAGIC1 0xFF - hfs_byte_t fi_version; /* Version of this structure: */ -#define HFS_CAP_VERSION 0x10 - hfs_byte_t fi_magic; /* Another magic number: */ -#define HFS_CAP_MAGIC 0xDA - hfs_byte_t fi_bitmap; /* Bitmap of which names are valid: */ -#define HFS_CAP_SHORTNAME 0x01 -#define HFS_CAP_LONGNAME 0x02 - hfs_byte_t fi_shortfilename[12+1]; /* "short name" (unused) */ - hfs_byte_t fi_macfilename[32+1]; /* Original (Macintosh) name */ - hfs_byte_t fi_comln; /* Length of comment (always 0) */ - hfs_byte_t fi_comnt[200]; /* Finder comment (unused) */ - /* optional: used by aufs only if compiled with USE_MAC_DATES */ - hfs_byte_t fi_datemagic; /* Magic number for dates extension: */ -#define HFS_CAP_DMAGIC 0xDA - hfs_byte_t fi_datevalid; /* Bitmap of which dates are valid: */ -#define HFS_CAP_MDATE 0x01 -#define HFS_CAP_CDATE 0x02 - hfs_lword_t fi_ctime; /* Creation date (in AFP format) */ - hfs_lword_t fi_mtime; /* Modify date (in AFP format) */ - hfs_lword_t fi_utime; /* Un*x time of last mtime change */ - hfs_byte_t pad; -}; - -#ifdef __KERNEL__ - -typedef ssize_t hfs_rwret_t; -typedef size_t hfs_rwarg_t; - -#include <asm/uaccess.h> - -/* Some forward declarations */ -struct hfs_fork; -struct hfs_cat_key; -struct hfs_cat_entry; -extern struct hfs_cat_entry *hfs_cat_get(struct hfs_mdb *, - const struct hfs_cat_key *); - -/* dir.c */ -extern int hfs_create(struct inode *, struct dentry *, int, struct nameidata *); -extern int hfs_mkdir(struct inode *, struct dentry *, int); -extern int hfs_unlink(struct inode *, struct dentry *); -extern int hfs_rmdir(struct inode *, struct dentry *); -extern int hfs_rename(struct inode *, struct dentry *, - struct inode *, struct dentry *); - -/* dir_cap.c */ -extern const struct hfs_name hfs_cap_reserved1[]; -extern const struct hfs_name hfs_cap_reserved2[]; -extern struct inode_operations hfs_cap_ndir_inode_operations; -extern struct inode_operations hfs_cap_fdir_inode_operations; -extern struct inode_operations hfs_cap_rdir_inode_operations; -extern struct file_operations hfs_cap_dir_operations; -extern void hfs_cap_drop_dentry(struct dentry *, const ino_t); - -/* dir_dbl.c */ -extern const struct hfs_name hfs_dbl_reserved1[]; -extern const struct hfs_name hfs_dbl_reserved2[]; -extern struct inode_operations hfs_dbl_dir_inode_operations; -extern struct file_operations hfs_dbl_dir_operations; -extern void hfs_dbl_drop_dentry(struct dentry *, const ino_t); - -/* dir_nat.c */ -extern const struct hfs_name hfs_nat_reserved1[]; -extern const struct hfs_name hfs_nat_reserved2[]; -extern struct inode_operations hfs_nat_ndir_inode_operations; -extern struct inode_operations hfs_nat_hdir_inode_operations; -extern struct file_operations hfs_nat_dir_operations; -extern void hfs_nat_drop_dentry(struct dentry *, const ino_t); - -/* file.c */ -extern hfs_s32 hfs_do_read(struct inode *, struct hfs_fork *, hfs_u32, - char __user *, hfs_u32); -extern hfs_s32 hfs_do_write(struct inode *, struct hfs_fork *, hfs_u32, - const char __user *, hfs_u32); -extern void hfs_file_fix_mode(struct hfs_cat_entry *entry); -extern struct inode_operations hfs_file_inode_operations; -extern struct file_operations hfs_file_operations; - -/* file_cap.c */ -extern struct inode_operations hfs_cap_info_inode_operations; -extern struct file_operations hfs_cap_info_operations; - -/* file_hdr.c */ -extern struct inode_operations hfs_hdr_inode_operations; -extern struct file_operations hfs_hdr_operations; -extern const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout; -extern const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout; -extern const struct hfs_hdr_layout hfs_nat_hdr_layout; -extern const struct hfs_hdr_layout hfs_nat2_hdr_layout; -extern const struct hfs_hdr_layout hfs_sngl_hdr_layout; -extern void hdr_truncate(struct inode *,size_t); - -/* inode.c */ -extern void hfs_put_inode(struct inode *); -extern int hfs_notify_change(struct dentry *, struct iattr *); -extern int hfs_notify_change_cap(struct dentry *, struct iattr *); -extern int hfs_notify_change_hdr(struct dentry *, struct iattr *); -extern struct inode *hfs_iget(struct hfs_cat_entry *, ino_t, struct dentry *); - -extern void hfs_cap_ifill(struct inode *, ino_t, const int); -extern void hfs_dbl_ifill(struct inode *, ino_t, const int); -extern void hfs_nat_ifill(struct inode *, ino_t, const int); -extern void hfs_sngl_ifill(struct inode *, ino_t, const int); - -/* super.c */ -extern int hfs_fill_super(struct super_block *,void *,int); - -/* trans.c */ -extern void hfs_colon2mac(struct hfs_name *, const char *, int); -extern void hfs_prcnt2mac(struct hfs_name *, const char *, int); -extern void hfs_triv2mac(struct hfs_name *, const char *, int); -extern void hfs_latin2mac(struct hfs_name *, const char *, int); -extern int hfs_mac2cap(char *, const struct hfs_name *); -extern int hfs_mac2nat(char *, const struct hfs_name *); -extern int hfs_mac2latin(char *, const struct hfs_name *); -extern int hfs_mac2seven(char *, const struct hfs_name *); -extern int hfs_mac2eight(char *, const struct hfs_name *); -extern int hfs_mac2alpha(char *, const struct hfs_name *); -extern int hfs_mac2triv(char *, const struct hfs_name *); -extern void hfs_tolower(unsigned char *, int); - -#include <linux/hfs_fs_i.h> -#include <linux/hfs_fs_sb.h> - -static inline struct hfs_inode_info *HFS_I(struct inode *inode) -{ - return container_of(inode, struct hfs_inode_info, vfs_inode); -} - -static inline struct hfs_sb_info *HFS_SB(struct super_block *sb) -{ - return sb->s_fs_info; -} - -static inline void hfs_nameout(struct inode *dir, struct hfs_name *out, - const char *in, int len) { - HFS_SB(dir->i_sb)->s_nameout(out, in, len); -} - -static inline int hfs_namein(struct inode *dir, char *out, - const struct hfs_name *in) { - int len = HFS_SB(dir->i_sb)->s_namein(out, in); - if (HFS_SB(dir->i_sb)->s_lowercase) { - hfs_tolower(out, len); - } - return len; -} - -#endif /* __KERNEL__ */ -#endif diff --git a/include/linux/hfs_fs_i.h b/include/linux/hfs_fs_i.h deleted file mode 100644 index 119cc5200197..000000000000 --- a/include/linux/hfs_fs_i.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * linux/include/linux/hfs_fs_i.h - * - * Copyright (C) 1995, 1996 Paul H. Hargrove - * This file may be distributed under the terms of the GNU General Public License. - * - * This file defines the type (struct hfs_inode_info) and the two - * subordinate types hfs_extent and hfs_file. - */ - -#ifndef _LINUX_HFS_FS_I_H -#define _LINUX_HFS_FS_I_H - -/* - * struct hfs_inode_info - * - * The HFS-specific part of a Linux (struct inode) - */ -struct hfs_inode_info { - int magic; /* A magic number */ - - loff_t mmu_private; - struct hfs_cat_entry *entry; - - /* For a regular or header file */ - struct hfs_fork *fork; - int convert; - - /* For a directory */ - ino_t file_type; - char dir_size; - - /* For header files */ - const struct hfs_hdr_layout *default_layout; - struct hfs_hdr_layout *layout; - - /* to deal with localtime ugliness */ - int tz_secondswest; - - /* for dentry cleanup */ - void (*d_drop_op)(struct dentry *, const ino_t); - struct inode vfs_inode; -}; - -#endif diff --git a/include/linux/hfs_fs_sb.h b/include/linux/hfs_fs_sb.h deleted file mode 100644 index 037ebd428b91..000000000000 --- a/include/linux/hfs_fs_sb.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * linux/include/linux/hfs_fs_sb.h - * - * Copyright (C) 1995-1997 Paul H. Hargrove - * This file may be distributed under the terms of the GNU General Public License. - * - * This file defines the type (struct hfs_sb_info) which contains the - * HFS-specific information in the in-core superblock. - */ - -#ifndef _LINUX_HFS_FS_SB_H -#define _LINUX_HFS_FS_SB_H - -/* forward declaration: */ -struct hfs_name; - -typedef int (*hfs_namein_fn) (char *, const struct hfs_name *); -typedef void (*hfs_nameout_fn) (struct hfs_name *, const char *, int); -typedef void (*hfs_ifill_fn) (struct inode *, ino_t, const int); - -/* - * struct hfs_sb_info - * - * The HFS-specific part of a Linux (struct super_block) - */ -struct hfs_sb_info { - int magic; /* A magic number */ - struct hfs_mdb *s_mdb; /* The HFS MDB */ - int s_quiet; /* Silent failure when - changing owner or mode? */ - int s_lowercase; /* Map names to lowercase? */ - int s_afpd; /* AFPD compatible mode? */ - int s_version; /* version info */ - hfs_namein_fn s_namein; /* The function used to - map Mac filenames to - Linux filenames */ - hfs_nameout_fn s_nameout; /* The function used to - map Linux filenames - to Mac filenames */ - hfs_ifill_fn s_ifill; /* The function used - to fill in inode fields */ - const struct hfs_name *s_reserved1; /* Reserved names */ - const struct hfs_name *s_reserved2; /* Reserved names */ - __u32 s_type; /* Type for new files */ - __u32 s_creator; /* Creator for new files */ - umode_t s_umask; /* The umask applied to the - permissions on all files */ - uid_t s_uid; /* The uid of all files */ - gid_t s_gid; /* The gid of all files */ - char s_conv; /* Type of text conversion */ -}; - -#endif diff --git a/include/linux/hfs_sysdep.h b/include/linux/hfs_sysdep.h deleted file mode 100644 index 4c4e3eba0963..000000000000 --- a/include/linux/hfs_sysdep.h +++ /dev/null @@ -1,238 +0,0 @@ -/* - * linux/include/linux/hfs_sysdep.h - * - * Copyright (C) 1996-1997 Paul H. Hargrove - * This file may be distributed under the terms of the GNU General Public License. - * - * This file contains constants, types and inline - * functions for various system dependent things. - * - * "XXX" in a comment is a note to myself to consider changing something. - * - * In function preconditions the term "valid" applied to a pointer to - * a structure means that the pointer is non-NULL and the structure it - * points to has all fields initialized to consistent values. - */ - -#ifndef _HFS_SYSDEP_H -#define _HFS_SYSDEP_H - -#include <linux/slab.h> -#include <linux/types.h> -#include <linux/fs.h> -#include <linux/sched.h> -#include <linux/buffer_head.h> - -#include <asm/byteorder.h> -#include <asm/unaligned.h> - -extern struct timezone sys_tz; - -/* Typedefs for integer types by size and signedness */ -typedef __u8 hfs_u8; -typedef __u16 hfs_u16; -typedef __u32 hfs_u32; -typedef __s8 hfs_s8; -typedef __s16 hfs_s16; -typedef __s32 hfs_s32; - -/* Typedefs for unaligned integer types */ -typedef unsigned char hfs_byte_t; -typedef unsigned char hfs_word_t[2]; -typedef unsigned char hfs_lword_t[4]; - -/* these funny looking things are GCC variable argument macros */ -#define hfs_warn(format, args...) printk(KERN_WARNING format , ## args) -#define hfs_error(format, args...) printk(KERN_ERR format , ## args) - - -#if defined(DEBUG_ALL) || defined(DEBUG_MEM) -extern long int hfs_alloc; -#endif - -static inline void *hfs_malloc(unsigned int size) { -#if defined(DEBUG_ALL) || defined(DEBUG_MEM) - hfs_warn("%ld bytes allocation at %s:%u\n", - (hfs_alloc += size), __FILE__, __LINE__); -#endif - return kmalloc(size, GFP_KERNEL); -} - -static inline void hfs_free(void *ptr, unsigned int size) { - kfree(ptr); -#if defined(DEBUG_ALL) || defined(DEBUG_MEM) - hfs_warn("%ld bytes allocation at %s:%u\n", - (hfs_alloc -= ptr ? size : 0), __FILE__, __LINE__); -#endif -} - - -/* handle conversion between times. - * - * NOTE: hfs+ doesn't need this. also, we don't use tz_dsttime as that's - * not a good thing to do. instead, we depend upon tz_minuteswest - * having the correct daylight savings correction. - */ -static inline hfs_u32 hfs_from_utc(hfs_s32 time) -{ - return time - sys_tz.tz_minuteswest*60; -} - -static inline hfs_s32 hfs_to_utc(hfs_u32 time) -{ - return time + sys_tz.tz_minuteswest*60; -} - -static inline hfs_u32 hfs_time(void) { - return htonl(hfs_from_utc(get_seconds())+2082844800U); -} - - -/* - * hfs_wait_queue - */ -typedef wait_queue_head_t hfs_wait_queue; - -static inline void hfs_init_waitqueue(hfs_wait_queue *queue) { - init_waitqueue_head(queue); -} - -static inline void hfs_sleep_on(hfs_wait_queue *queue) { - sleep_on(queue); -} - -static inline void hfs_wake_up(hfs_wait_queue *queue) { - wake_up(queue); -} - -static inline void hfs_relinquish(void) { - schedule(); -} - - -/* - * hfs_sysmdb - */ -typedef struct super_block *hfs_sysmdb; - -static inline void hfs_mdb_dirty(hfs_sysmdb sys_mdb) { - sys_mdb->s_dirt = 1; -} - -static inline const char *hfs_mdb_name(hfs_sysmdb sys_mdb) { - return sys_mdb->s_id; -} - - -/* - * hfs_sysentry - */ -typedef struct dentry *hfs_sysentry[4]; - -/* - * hfs_buffer - */ -typedef struct buffer_head *hfs_buffer; - -#define HFS_BAD_BUFFER NULL - -/* In sysdep.c, since it needs HFS_SECTOR_SIZE */ -extern hfs_buffer hfs_buffer_get(hfs_sysmdb, int, int); - -static inline int hfs_buffer_ok(hfs_buffer buffer) { - return (buffer != NULL); -} - -static inline void hfs_buffer_put(hfs_buffer buffer) { - brelse(buffer); -} - -static inline void hfs_buffer_dirty(hfs_buffer buffer) { - mark_buffer_dirty(buffer); -} - -static inline void hfs_buffer_sync(hfs_buffer buffer) { - if (buffer_dirty(buffer)) - sync_dirty_buffer(buffer); -} - -static inline void *hfs_buffer_data(const hfs_buffer buffer) { - return buffer->b_data; -} - - -/* - * bit operations - */ - -#undef BITNR -#if defined(__BIG_ENDIAN) -# define BITNR(X) ((X)^31) -# if !defined(__constant_htonl) -# define __constant_htonl(x) (x) -# endif -# if !defined(__constant_htons) -# define __constant_htons(x) (x) -# endif -#elif defined(__LITTLE_ENDIAN) -# define BITNR(X) ((X)^7) -# if !defined(__constant_htonl) -# define __constant_htonl(x) \ - ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \ - (((unsigned long int)(x) & 0x0000ff00U) << 8) | \ - (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \ - (((unsigned long int)(x) & 0xff000000U) >> 24))) -# endif -# if !defined(__constant_htons) -# define __constant_htons(x) \ - ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \ - (((unsigned short int)(x) & 0xff00) >> 8))) -# endif -#else -# error "Don't know if bytes are big- or little-endian!" -#endif - -static inline int hfs_clear_bit(int bitnr, hfs_u32 *lword) { - return test_and_clear_bit(BITNR(bitnr), (unsigned long *)lword); -} - -static inline int hfs_set_bit(int bitnr, hfs_u32 *lword) { - return test_and_set_bit(BITNR(bitnr), (unsigned long *)lword); -} - -static inline int hfs_test_bit(int bitnr, const hfs_u32 *lword) { - /* the kernel should declare the second arg of test_bit as const */ - return test_bit(BITNR(bitnr), (unsigned long *)lword); -} - -#undef BITNR - -/* - * HFS structures have fields aligned to 16-bit boundaries. - * So, 16-bit get/put are easy while 32-bit get/put need - * some care on architectures like the DEC Alpha. - * - * In what follows: - * ns = 16-bit integer in network byte-order w/ 16-bit alignment - * hs = 16-bit integer in host byte-order w/ 16-bit alignment - * nl = 32-bit integer in network byte-order w/ unknown alignment - * hl = 32-bit integer in host byte-order w/ unknown alignment - * anl = 32-bit integer in network byte-order w/ 32-bit alignment - * ahl = 32-bit integer in host byte-order w/ 32-bit alignment - * Example: hfs_get_hl() gets an unaligned 32-bit integer converting - * it to host byte-order. - */ -#define hfs_get_hs(addr) ntohs(*((hfs_u16 *)(addr))) -#define hfs_get_ns(addr) (*((hfs_u16 *)(addr))) -#define hfs_get_hl(addr) ntohl(get_unaligned((hfs_u32 *)(addr))) -#define hfs_get_nl(addr) get_unaligned((hfs_u32 *)(addr)) -#define hfs_get_ahl(addr) ntohl(*((hfs_u32 *)(addr))) -#define hfs_get_anl(addr) (*((hfs_u32 *)(addr))) -#define hfs_put_hs(val, addr) ((void)(*((hfs_u16 *)(addr)) = ntohs(val))) -#define hfs_put_ns(val, addr) ((void)(*((hfs_u16 *)(addr)) = (val))) -#define hfs_put_hl(val, addr) put_unaligned(htonl(val), (hfs_u32 *)(addr)) -#define hfs_put_nl(val, addr) put_unaligned((val), (hfs_u32 *)(addr)) -#define hfs_put_ahl(val, addr) ((void)(*((hfs_u32 *)(addr)) = ntohl(val))) -#define hfs_put_anl(val, addr) ((void)(*((hfs_u32 *)(addr)) = (val))) - -#endif diff --git a/include/linux/isicom.h b/include/linux/isicom.h index c24383215978..a5a3eea548e8 100644 --- a/include/linux/isicom.h +++ b/include/linux/isicom.h @@ -73,7 +73,6 @@ typedef struct { #define PORT_COUNT (BOARD_COUNT*16) #define SERIAL_TYPE_NORMAL 1 -#define SERIAL_TYPE_CALLOUT 2 /* character sizes */ diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ebc9426684ba..fd5ae72d8ae9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -525,11 +525,6 @@ extern struct net_device *__dev_get_by_flags(unsigned short flags, unsigned short mask); extern struct net_device *dev_get_by_name(const char *name); extern struct net_device *__dev_get_by_name(const char *name); -extern struct net_device *__dev_alloc(const char *name, int *err); -static inline __deprecated struct net_device *dev_alloc(const char *name, int *err) -{ - return __dev_alloc(name, err); -} extern int dev_alloc_name(struct net_device *dev, const char *name); extern int dev_open(struct net_device *dev); extern int dev_close(struct net_device *dev); diff --git a/include/linux/serial.h b/include/linux/serial.h index 465f19a0d53d..9a07d00106f9 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h @@ -131,7 +131,6 @@ struct serial_uart_config { /* Internal flags used only by kernel/chr_drv/serial.c */ #define ASYNC_INITIALIZED 0x80000000 /* Serial port was initialized */ -#define ASYNC_CALLOUT_ACTIVE 0x40000000 /* Call out device is active */ #define ASYNC_NORMAL_ACTIVE 0x20000000 /* Normal device is active */ #define ASYNC_BOOT_AUTOCONF 0x10000000 /* Autoconfigure port on bootup */ #define ASYNC_CLOSING 0x08000000 /* Serial port is closing */ diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index f0b98e5a5473..ba9506f322b4 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -275,6 +275,5 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op); /* serial subtype definitions */ #define SERIAL_TYPE_NORMAL 1 -#define SERIAL_TYPE_CALLOUT 2 #endif /* #ifdef _LINUX_TTY_DRIVER_H */ |
