diff options
Diffstat (limited to 'include')
31 files changed, 349 insertions, 246 deletions
diff --git a/include/asm-alpha/hw_irq.h b/include/asm-alpha/hw_irq.h index ca9d43b..a37db0f 100644 --- a/include/asm-alpha/hw_irq.h +++ b/include/asm-alpha/hw_irq.h @@ -2,8 +2,6 @@ #define _ALPHA_HW_IRQ_H -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} - extern volatile unsigned long irq_err_count; #ifdef CONFIG_ALPHA_GENERIC diff --git a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h index 25d540e..923e0ca 100644 --- a/include/asm-arm/mach/pci.h +++ b/include/asm-arm/mach/pci.h @@ -28,7 +28,7 @@ struct hw_pci { struct pci_sys_data { struct list_head node; int busnr; /* primary bus number */ - unsigned long mem_offset; /* bus->cpu memory mapping offset */ + u64 mem_offset; /* bus->cpu memory mapping offset */ unsigned long io_offset; /* bus->cpu IO mapping offset */ struct pci_bus *bus; /* PCI bus */ struct resource *resource[3]; /* Primary PCI bus resources */ diff --git a/include/asm-cris/hw_irq.h b/include/asm-cris/hw_irq.h index 341536a..2980660 100644 --- a/include/asm-cris/hw_irq.h +++ b/include/asm-cris/hw_irq.h @@ -1,7 +1,5 @@ #ifndef _ASM_HW_IRQ_H #define _ASM_HW_IRQ_H -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} - #endif diff --git a/include/asm-cris/irq.h b/include/asm-cris/irq.h index 4b33879..998cce9 100644 --- a/include/asm-cris/irq.h +++ b/include/asm-cris/irq.h @@ -1,11 +1,6 @@ #ifndef _ASM_IRQ_H #define _ASM_IRQ_H -/* - * IRQ line status macro IRQ_PER_CPU is used - */ -#define ARCH_HAS_IRQ_PER_CPU - #include <asm/arch/irq.h> static inline int irq_canonicalize(int irq) diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index a4c0a5a..87e5a35 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h @@ -69,14 +69,4 @@ extern atomic_t irq_mis_count; #define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) -#if defined(CONFIG_X86_IO_APIC) -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) -{ - if (IO_APIC_IRQ(i)) - send_IPI_self(IO_APIC_VECTOR(i)); -} -#else -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} -#endif - #endif /* _ASM_HW_IRQ_H */ diff --git a/include/asm-i386/mach-visws/setup_arch.h b/include/asm-i386/mach-visws/setup_arch.h index b92d6d9..33f700e 100644 --- a/include/asm-i386/mach-visws/setup_arch.h +++ b/include/asm-i386/mach-visws/setup_arch.h @@ -1,5 +1,8 @@ /* Hook to call BIOS initialisation function */ +extern unsigned long sgivwfb_mem_phys; +extern unsigned long sgivwfb_mem_size; + /* no action for visws */ #define ARCH_SETUP diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h index ea8b8c4..27f9df6 100644 --- a/include/asm-ia64/hw_irq.h +++ b/include/asm-ia64/hw_irq.h @@ -97,8 +97,7 @@ extern int reserve_irq_vector (int vector); extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); -static inline void -hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector) +static inline void ia64_resend_irq(unsigned int vector) { platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); } diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h index dbe86c0..79479e2 100644 --- a/include/asm-ia64/irq.h +++ b/include/asm-ia64/irq.h @@ -14,11 +14,6 @@ #define NR_IRQS 256 #define NR_IRQ_VECTORS NR_IRQS -/* - * IRQ line status macro IRQ_PER_CPU is used - */ -#define ARCH_HAS_IRQ_PER_CPU - static __inline__ int irq_canonicalize (int irq) { diff --git a/include/asm-m32r/hw_irq.h b/include/asm-m32r/hw_irq.h index 8d7e9d0..7138537 100644 --- a/include/asm-m32r/hw_irq.h +++ b/include/asm-m32r/hw_irq.h @@ -1,9 +1,4 @@ #ifndef _ASM_M32R_HW_IRQ_H #define _ASM_M32R_HW_IRQ_H -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) -{ - /* Nothing to do */ -} - #endif /* _ASM_M32R_HW_IRQ_H */ diff --git a/include/asm-mips/hw_irq.h b/include/asm-mips/hw_irq.h index c854d01..458d9fd 100644 --- a/include/asm-mips/hw_irq.h +++ b/include/asm-mips/hw_irq.h @@ -19,9 +19,9 @@ extern void init_8259A(int aeoi); extern atomic_t irq_err_count; -/* This may not be apropriate for all machines, we'll see ... */ -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) -{ -} +/* + * interrupt-retrigger: NOP for now. This may not be apropriate for all + * machines, we'll see ... + */ #endif /* __ASM_HW_IRQ_H */ diff --git a/include/asm-mips/mach-mips/irq.h b/include/asm-mips/mach-mips/irq.h index 083d9c5..e994b0c 100644 --- a/include/asm-mips/mach-mips/irq.h +++ b/include/asm-mips/mach-mips/irq.h @@ -4,10 +4,4 @@ #define NR_IRQS 256 -#ifdef CONFIG_SMP - -#define ARCH_HAS_IRQ_PER_CPU - -#endif - #endif /* __ASM_MACH_MIPS_IRQ_H */ diff --git a/include/asm-parisc/hw_irq.h b/include/asm-parisc/hw_irq.h index 151426e..6707f7d 100644 --- a/include/asm-parisc/hw_irq.h +++ b/include/asm-parisc/hw_irq.h @@ -3,15 +3,6 @@ /* * linux/include/asm/hw_irq.h - * - * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar - * - * moved some of the old arch/i386/kernel/irq.h to here. VY - * - * IRQ/IPI changes taken from work by Thomas Radke - * <tomsoft@informatik.tu-chemnitz.de> */ -extern void hw_resend_irq(struct hw_interrupt_type *, unsigned int); - #endif diff --git a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h index 377ba90..5cae260 100644 --- a/include/asm-parisc/irq.h +++ b/include/asm-parisc/irq.h @@ -26,11 +26,6 @@ #define NR_IRQS (CPU_IRQ_MAX + 1) -/* - * IRQ line status macro IRQ_PER_CPU is used - */ -#define ARCH_HAS_IRQ_PER_CPU - static __inline__ int irq_canonicalize(int irq) { return (irq == 2) ? 9 : irq; diff --git a/include/asm-powerpc/hw_irq.h b/include/asm-powerpc/hw_irq.h index ce0f7db..d403592 100644 --- a/include/asm-powerpc/hw_irq.h +++ b/include/asm-powerpc/hw_irq.h @@ -86,27 +86,27 @@ static inline void local_irq_save_ptr(unsigned long *flags) #define mask_irq(irq) \ ({ \ irq_desc_t *desc = get_irq_desc(irq); \ - if (desc->handler && desc->handler->disable) \ - desc->handler->disable(irq); \ + if (desc->chip && desc->chip->disable) \ + desc->chip->disable(irq); \ }) #define unmask_irq(irq) \ ({ \ irq_desc_t *desc = get_irq_desc(irq); \ - if (desc->handler && desc->handler->enable) \ - desc->handler->enable(irq); \ + if (desc->chip && desc->chip->enable) \ + desc->chip->enable(irq); \ }) #define ack_irq(irq) \ ({ \ irq_desc_t *desc = get_irq_desc(irq); \ - if (desc->handler && desc->handler->ack) \ - desc->handler->ack(irq); \ + if (desc->chip && desc->chip->ack) \ + desc->chip->ack(irq); \ }) -/* Should we handle this via lost interrupts and IPIs or should we don't care like - * we do now ? --BenH. +/* + * interrupt-retrigger: should we handle this via lost interrupts and IPIs + * or should we not care like we do now ? --BenH. */ struct hw_interrupt_type; -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_HW_IRQ_H */ diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index a10feec..eb5f33e 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h @@ -30,11 +30,6 @@ #define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */ #define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */ -/* - * IRQ line status macro IRQ_PER_CPU is used - */ -#define ARCH_HAS_IRQ_PER_CPU - #define get_irq_desc(irq) (&irq_desc[(irq)]) /* Define a way to iterate across irqs. */ diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index 5d2c9e6..46afd29 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h @@ -242,7 +242,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file, #define HAVE_ARCH_PCI_RESOURCE_TO_USER extern void pci_resource_to_user(const struct pci_dev *dev, int bar, const struct resource *rsrc, - u64 *start, u64 *end); + resource_size_t *start, resource_size_t *end); #endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */ #endif /* __KERNEL__ */ diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h index 61434ed..11ffaaa 100644 --- a/include/asm-ppc/pci.h +++ b/include/asm-ppc/pci.h @@ -133,7 +133,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file, #define HAVE_ARCH_PCI_RESOURCE_TO_USER extern void pci_resource_to_user(const struct pci_dev *dev, int bar, const struct resource *rsrc, - u64 *start, u64 *end); + resource_size_t *start, resource_size_t *end); #endif /* __KERNEL__ */ diff --git a/include/asm-sh/hw_irq.h b/include/asm-sh/hw_irq.h index 1d934fb..fed2661 100644 --- a/include/asm-sh/hw_irq.h +++ b/include/asm-sh/hw_irq.h @@ -1,9 +1,4 @@ #ifndef __ASM_SH_HW_IRQ_H #define __ASM_SH_HW_IRQ_H -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) -{ - /* Nothing to do */ -} - #endif /* __ASM_SH_HW_IRQ_H */ diff --git a/include/asm-sh64/hw_irq.h b/include/asm-sh64/hw_irq.h index ae718d1..ebb3908 100644 --- a/include/asm-sh64/hw_irq.h +++ b/include/asm-sh64/hw_irq.h @@ -11,6 +11,5 @@ * Copyright (C) 2000, 2001 Paolo Alberelli * */ -static __inline__ void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { /* Nothing to do */ } #endif /* __ASM_SH64_HW_IRQ_H */ diff --git a/include/asm-um/hw_irq.h b/include/asm-um/hw_irq.h index 4ee38c0..1cf84cf 100644 --- a/include/asm-um/hw_irq.h +++ b/include/asm-um/hw_irq.h @@ -4,7 +4,4 @@ #include "asm/irq.h" #include "asm/archparam.h" -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) -{} - #endif diff --git a/include/asm-v850/hw_irq.h b/include/asm-v850/hw_irq.h index a8aab43..043e94b 100644 --- a/include/asm-v850/hw_irq.h +++ b/include/asm-v850/hw_irq.h @@ -1,8 +1,4 @@ #ifndef __V850_HW_IRQ_H__ #define __V850_HW_IRQ_H__ -static inline void hw_resend_irq (struct hw_interrupt_type *h, unsigned int i) -{ -} - #endif /* __V850_HW_IRQ_H__ */ diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index 9318774..48a4a53 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h @@ -127,15 +127,6 @@ __asm__( \ "push $~(" #nr ") ; " \ "jmp common_interrupt"); -#if defined(CONFIG_X86_IO_APIC) -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { - if (IO_APIC_IRQ(i)) - send_IPI_self(IO_APIC_VECTOR(i)); -} -#else -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} -#endif - #define platform_legacy_irq(irq) ((irq) < 16) #endif diff --git a/include/asm-xtensa/hw_irq.h b/include/asm-xtensa/hw_irq.h index ccf4362..3ddbea7 100644 --- a/include/asm-xtensa/hw_irq.h +++ b/include/asm-xtensa/hw_irq.h @@ -11,8 +11,4 @@ #ifndef _XTENSA_HW_IRQ_H #define _XTENSA_HW_IRQ_H -static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) -{ -} - #endif diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 70741e1..db2a63a 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -36,6 +36,20 @@ extern void free_irq(unsigned int, void *); extern void disable_irq_nosync(unsigned int irq); extern void disable_irq(unsigned int irq); extern void enable_irq(unsigned int irq); + +/* IRQ wakeup (PM) control: */ +extern int set_irq_wake(unsigned int irq, unsigned int on); + +static inline int enable_irq_wake(unsigned int irq) +{ + return set_irq_wake(irq, 1); +} + +static inline int disable_irq_wake(unsigned int irq) +{ + return set_irq_wake(irq, 0); +} + #endif #ifndef __ARCH_SET_SOFTIRQ_PENDING diff --git a/include/linux/ioport.h b/include/linux/ioport.h index edfc733..87a9fc0 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -9,13 +9,15 @@ #define _LINUX_IOPORT_H #include <linux/compiler.h> +#include <linux/types.h> /* * Resources are tree-like, allowing * nesting etc.. */ struct resource { + resource_size_t start; + resource_size_t end; const char *name; - unsigned long start, end; unsigned long flags; struct resource *parent, *sibling, *child; }; @@ -96,14 +98,13 @@ extern struct resource * ____request_resource(struct resource *root, struct reso extern int release_resource(struct resource *new); extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); extern int allocate_resource(struct resource *root, struct resource *new, - unsigned long size, - unsigned long min, unsigned long max, - unsigned long align, + resource_size_t size, resource_size_t min, + resource_size_t max, resource_size_t align, void (*alignf)(void *, struct resource *, - unsigned long, unsigned long), + resource_size_t, resource_size_t), void *alignf_data); -int adjust_resource(struct resource *res, unsigned long start, - unsigned long size); +int adjust_resource(struct resource *res, resource_size_t start, + resource_size_t size); /* get registered SYSTEM_RAM resources in specified area */ extern int find_next_system_ram(struct resource *res); @@ -113,17 +114,21 @@ extern int find_next_system_ram(struct resource *res); #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) #define rename_region(region, newname) do { (region)->name = (newname); } while (0) -extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name); +extern struct resource * __request_region(struct resource *, + resource_size_t start, + resource_size_t n, const char *name); /* Compatibility cruft */ #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) -extern int __check_region(struct resource *, unsigned long, unsigned long); -extern void __release_region(struct resource *, unsigned long, unsigned long); +extern int __check_region(struct resource *, resource_size_t, resource_size_t); +extern void __release_region(struct resource *, resource_size_t, + resource_size_t); -static inline int __deprecated check_region(unsigned long s, unsigned long n) +static inline int __deprecated check_region(resource_size_t s, + resource_size_t n) { return __check_region(&ioport_resource, s, n); } diff --git a/include/linux/irq.h b/include/linux/irq.h index 676e00d..0832149 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -1,5 +1,5 @@ -#ifndef __irq_h -#define __irq_h +#ifndef _LINUX_IRQ_H +#define _LINUX_IRQ_H /* * Please do not include this file in generic code. There is currently @@ -11,7 +11,7 @@ #include <linux/smp.h> -#if !defined(CONFIG_S390) +#ifndef CONFIG_S390 #include <linux/linkage.h> #include <linux/cache.h> @@ -33,75 +33,160 @@ #define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ #define IRQ_LEVEL 64 /* IRQ level triggered */ #define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ -#if defined(ARCH_HAS_IRQ_PER_CPU) +#ifdef CONFIG_IRQ_PER_CPU # define IRQ_PER_CPU 256 /* IRQ is per CPU */ # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) #else # define CHECK_IRQ_PER_CPU(var) 0 #endif +#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ +#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */ +#define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */ +#define IRQ_DELAYED_DISABLE \ + 4096 /* IRQ disable (masking) happens delayed. */ + /* - * Interrupt controller descriptor. This is all we need - * to describe about the low-level hardware. + * IRQ types, see also include/linux/interrupt.h */ -struct hw_interrupt_type { - const char * typename; - unsigned int (*startup)(unsigned int irq); - void (*shutdown)(unsigned int irq); - void (*enable)(unsigned int irq); - void (*disable)(unsigned int irq); - void (*ack)(unsigned int irq); - void (*end)(unsigned int irq); - void (*set_affinity)(unsigned int irq, cpumask_t dest); +#define IRQ_TYPE_NONE 0x0000 /* Default, unspecified type */ +#define IRQ_TYPE_EDGE_RISING 0x0001 /* Edge rising type */ +#define IRQ_TYPE_EDGE_FALLING 0x0002 /* Edge falling type */ +#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) +#define IRQ_TYPE_LEVEL_HIGH 0x0004 /* Level high type */ +#define IRQ_TYPE_LEVEL_LOW 0x0008 /* Level low type */ +#define IRQ_TYPE_SENSE_MASK 0x000f /* Mask of the above */ +#define IRQ_TYPE_SIMPLE 0x0010 /* Simple type */ +#define IRQ_TYPE_PERCPU 0x0020 /* Per CPU type */ +#define IRQ_TYPE_PROBE 0x0040 /* Probing in progress */ + +struct proc_dir_entry; + +/** + * struct irq_chip - hardware interrupt chip descriptor + * + * @name: name for /proc/interrupts + * @startup: start up the interrupt (defaults to ->enable if NULL) + * @shutdown: shut down the interrupt (defaults to ->disable if NULL) + * @enable: enable the interrupt (defaults to chip->unmask if NULL) + * @disable: disable the interrupt (defaults to chip->mask if NULL) + * @ack: start of a new interrupt + * @mask: mask an interrupt source + * @mask_ack: ack and mask an interrupt source + * @unmask: unmask an interrupt source + * @eoi: end of interrupt - chip level + * @end: end of interrupt - flow level + * @set_affinity: set the CPU affinity on SMP machines + * @retrigger: resend an IRQ to the CPU + * @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ + * @set_wake: enable/disable power-management wake-on of an IRQ + * + * @release: release function solely used by UML + * @typename: obsoleted by name, kept as migration helper + */ +struct irq_chip { + const char *name; + unsigned int (*startup)(unsigned int irq); + void (*shutdown)(unsigned int irq); + void (*enable)(unsigned int irq); + void (*disable)(unsigned int irq); + + void (*ack)(unsigned int irq); + void (*mask)(unsigned int irq); + void (*mask_ack)(unsigned int irq); + void (*unmask)(unsigned int irq); + void (*eoi)(unsigned int irq); + + void (*end)(unsigned int irq); + void (*set_affinity)(unsigned int irq, cpumask_t dest); + int (*retrigger)(unsigned int irq); + int (*set_type)(unsigned int irq, unsigned int flow_type); + int (*set_wake)(unsigned int irq, unsigned int on); + /* Currently used only by UML, might disappear one day.*/ #ifdef CONFIG_IRQ_RELEASE_METHOD - void (*release)(unsigned int irq, void *dev_id); + void (*release)(unsigned int irq, void *dev_id); #endif + /* + * For compatibility, ->typename is copied into ->name. + * Will disappear. + */ + const char *typename; }; -typedef struct hw_interrupt_type hw_irq_controller; - -/* - * This is the "IRQ descriptor", which contains various information - * about the irq, including what kind of hardware handling it has, - * whether it is disabled etc etc. +/** + * struct irq_desc - interrupt descriptor + * + * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] + * @chip: low level interrupt hardware access + * @handler_data: per-IRQ data for the irq_chip methods + * @chip_data: platform-specific per-chip private data for the chip + * methods, to allow shared chip implementations + * @action: the irq action chain + * @status: status information + * @depth: disable-depth, for nested irq_disable() calls + * @irq_count: stats field to detect stalled irqs + * @irqs_unhandled: stats field for spurious unhandled interrupts + * @lock: locking for SMP + * @affinity: IRQ affinity on SMP + * @cpu: cpu index useful for balancing + * @pending_mask: pending rebalanced interrupts + * @move_irq: need to re-target IRQ destination + * @dir: /proc/irq/ procfs entry + * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP * * Pad this out to 32 bytes for cache and indexing reasons. */ -typedef struct irq_desc { - hw_irq_controller *handler; - void *handler_data; - struct irqaction *action; /* IRQ action list */ - unsigned int status; /* IRQ status */ - unsigned int depth; /* nested irq disables */ - unsigned int irq_count; /* For detecting broken interrupts */ - unsigned int irqs_unhandled; - spinlock_t lock; -#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) - unsigned int move_irq; /* Flag need to re-target intr dest*/ +struct irq_desc { + void fastcall (*handle_irq)(unsigned int irq, + struct irq_desc *desc, + struct pt_regs *regs); + struct irq_chip *chip; + void *handler_data; + void *chip_data; + struct irqaction *action; /* IRQ action list */ + unsigned int status; /* IRQ status */ + + unsigned int depth; /* nested irq disables */ + unsigned int irq_count; /* For detecting broken IRQs */ + unsigned int irqs_unhandled; + spinlock_t lock; +#ifdef CONFIG_SMP + cpumask_t affinity; + unsigned int cpu; +#endif +#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) + cpumask_t pending_mask; + unsigned int move_irq; /* need to re-target IRQ dest */ #endif -} ____cacheline_aligned irq_desc_t; +#ifdef CONFIG_PROC_FS + struct proc_dir_entry *dir; +#endif +} ____cacheline_aligned; -extern irq_desc_t irq_desc [NR_IRQS]; +extern struct irq_desc irq_desc[NR_IRQS]; -/* Return a pointer to the irq descriptor for IRQ. */ -static inline irq_desc_t * -irq_descp (int irq) -{ - return irq_desc + irq; -} +/* + * Migration helpers for obsolete names, they will go away: + */ +#define hw_interrupt_type irq_chip +typedef struct irq_chip hw_irq_controller; +#define no_irq_type no_irq_chip +typedef struct irq_desc irq_desc_t; -#include <asm/hw_irq.h> /* the arch dependent stuff */ +/* + * Pick up the arch-dependent methods: + */ +#include <asm/hw_irq.h> -extern int setup_irq(unsigned int irq, struct irqaction * new); +extern int setup_irq(unsigned int irq, struct irqaction *new); #ifdef CONFIG_GENERIC_HARDIRQS -extern cpumask_t irq_affinity[NR_IRQS]; #ifdef CONFIG_SMP static inline void set_native_irq_info(int irq, cpumask_t mask) { - irq_affinity[irq] = mask; + irq_desc[irq].affinity = mask; } #else static inline void set_native_irq_info(int irq, cpumask_t mask) @@ -111,8 +196,7 @@ static inline void set_native_irq_info(int irq, cpumask_t mask) #ifdef CONFIG_SMP -#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) -extern cpumask_t pending_irq_cpumask[NR_IRQS]; +#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) void set_pending_irq(unsigned int irq, cpumask_t mask); void move_native_irq(int irq); @@ -133,7 +217,7 @@ static inline void set_irq_info(int irq, cpumask_t mask) { } -#else // CONFIG_PCI_MSI +#else /* CONFIG_PCI_MSI */ static inline void move_irq(int irq) { @@ -144,26 +228,36 @@ static inline void set_irq_info(int irq, cpumask_t mask) { set_native_irq_info(irq, mask); } -#endif // CONFIG_PCI_MSI -#else // CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE +#endif /* CONFIG_PCI_MSI */ + +#else /* CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE */ + +static inline void move_irq(int irq) +{ +} + +static inline void move_native_irq(int irq) +{ +} + +static inline void set_pending_irq(unsigned int irq, cpumask_t mask) +{ +} -#define move_irq(x) -#define move_native_irq(x) -#define set_pending_irq(x,y) static inline void set_irq_info(int irq, cpumask_t mask) { set_native_irq_info(irq, mask); } -#endif // CONFIG_GENERIC_PENDING_IRQ +#endif /* CONFIG_GENERIC_PENDING_IRQ */ -#else // CONFIG_SMP +#else /* CONFIG_SMP */ #define move_irq(x) #define move_native_irq(x) -#endif // CONFIG_SMP +#endif /* CONFIG_SMP */ #ifdef CONFIG_IRQBALANCE extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask); @@ -173,32 +267,138 @@ static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask) } #endif +#ifdef CONFIG_AUTO_IRQ_AFFINITY +extern int select_smp_affinity(unsigned int irq); +#else +static inline int select_smp_affinity(unsigned int irq) +{ + return 1; +} +#endif + extern int no_irq_affinity; -extern int noirqdebug_setup(char *str); -extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, - struct irqaction *action); +/* Handle irq action chains: */ +extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, + struct irqaction *action); + +/* + * Built-in IRQ handlers for various IRQ types, + * callable via desc->chip->handle_irq() + */ +extern void fastcall +handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); +extern void fastcall +handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc, + struct pt_regs *regs); +extern void fastcall +handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); +extern void fastcall +handle_simple_irq(unsigned int irq, struct irq_desc *desc, + struct pt_regs *regs); +extern void fastcall +handle_percpu_irq(unsigned int irq, struct irq_desc *desc, + struct pt_regs *regs); +extern void fastcall +handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); + +/* + * Get a descriptive string for the highlevel handler, for + * /proc/interrupts output: + */ +extern const char * +handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *, + struct pt_regs *)); + +/* + * Monolithic do_IRQ implementation. + * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) + */ extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); -extern void note_interrupt(unsigned int irq, irq_desc_t *desc, - int action_ret, struct pt_regs *regs); -extern int can_request_irq(unsigned int irq, unsigned long irqflags); +/* + * Architectures call this to let the generic IRQ layer + * handle an interrupt. If the descriptor is attached to an + * irqchip-style controller then we call the ->handle_irq() handler, + * and it calls __do_IRQ() if it's attached to an irqtype-style controller. + */ +static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs) +{ + struct irq_desc *desc = irq_desc + irq; + + if (likely(desc->handle_irq)) + desc->handle_irq(irq, desc, regs); + else + __do_IRQ(irq, regs); +} + +/* Handling of unhandled and spurious interrupts: */ +extern void note_interrupt(unsigned int irq, struct irq_desc *desc, + int action_ret, struct pt_regs *regs); + +/* Resending of interrupts :*/ +void check_irq_resend(struct irq_desc *desc, unsigned int irq); + +/* Initialize /proc/irq/ */ extern void init_irq_proc(void); -#ifdef CONFIG_AUTO_IRQ_AFFINITY -extern int select_smp_affinity(unsigned int irq); -#else -static inline int -select_smp_affinity(unsigned int irq) +/* Enable/disable irq debugging output: */ +extern int noirqdebug_setup(char *str); + +/* Checks whether the interrupt can be requested by request_irq(): */ +extern int can_request_irq(unsigned int irq, unsigned long irqflags); + +/* Dummy irq-chip implementation: */ +extern struct irq_chip no_irq_chip; + +extern void +set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, + void fastcall (*handle)(unsigned int, + struct irq_desc *, + struct pt_regs *)); +extern void +__set_irq_handler(unsigned int irq, + void fastcall (*handle)(unsigned int, struct irq_desc *, + struct pt_regs *), + int is_chained); + +/* + * Set a highlevel flow handler for a given IRQ: + */ +static inline void +set_irq_handler(unsigned int irq, + void fastcall (*handle)(unsigned int, struct irq_desc *, + struct pt_regs *)) { - return 1; + __set_irq_handler(irq, handle, 0); } -#endif -#endif +/* + * Set a highlevel chained flow handler for a given IRQ. + * (a chained handler is automatically enabled and set to + * IRQ_NOREQUEST and IRQ_NOPROBE) + */ +static inline void +set_irq_chained_handler(unsigned int irq, + void fastcall (*handle)(unsigned int, struct irq_desc *, + struct pt_regs *)) +{ + __set_irq_handler(irq, handle, 1); +} -extern hw_irq_controller no_irq_type; /* needed in every arch ? */ +/* Set/get chip/data for an IRQ: */ -#endif +extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); +extern int set_irq_data(unsigned int irq, void *data); +extern int set_irq_chip_data(unsigned int irq, void *data); +extern int set_irq_type(unsigned int irq, unsigned int type); + +#define get_irq_chip(irq) (irq_desc[irq].chip) +#define get_irq_chip_data(irq) (irq_desc[irq].chip_data) +#define get_irq_data(irq) (irq_desc[irq].handler_data) + +#endif /* CONFIG_GENERIC_HARDIRQS */ + +#endif /* !CONFIG_S390 */ -#endif /* __irq_h */ +#endif /* _LINUX_IRQ_H */ diff --git a/include/linux/isdn/tpam.h b/include/linux/isdn/tpam.h deleted file mode 100644 index d18dd0d..0000000 --- a/include/linux/isdn/tpam.h +++ /dev/null @@ -1,55 +0,0 @@ -/* $Id: tpam.h,v 1.1.2.1 2001/06/08 08:23:46 kai Exp $ - * - * Turbo PAM ISDN driver for Linux. (Kernel Driver) - * - * Copyright 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve - * - * For all support questions please contact: <support@auvertech.fr> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef _TPAM_H_ -#define _TPAM_H_ - -#include <linux/types.h> - -/* IOCTL commands */ -#define TPAM_CMD_DSPLOAD 0x0001 -#define TPAM_CMD_DSPSAVE 0x0002 -#define TPAM_CMD_DSPRUN 0x0003 -#define TPAM_CMD_LOOPMODEON 0x0004 -#define TPAM_CMD_LOOPMODEOFF 0x0005 - -/* addresses of debug information zones on board */ -#define TPAM_TRAPAUDIT_REGISTER 0x005493e4 -#define TPAM_NCOAUDIT_REGISTER 0x00500000 -#define TPAM_MSGAUDIT_REGISTER 0x008E30F0 - -/* length of debug information zones on board */ -#define TPAM_TRAPAUDIT_LENGTH 10000 -#define TPAM_NCOAUDIT_LENGTH 300000 -#define TPAM_NCOAUDIT_COUNT 30 -#define TPAM_MSGAUDIT_LENGTH 60000 - -/* IOCTL load/save parameter */ -typedef struct tpam_dsp_ioctl { - __u32 address; /* address to load/save data */ - __u32 data_len; /* size of data to be loaded/saved */ - __u8 data[0]; /* data */ -} tpam_dsp_ioctl; - -#endif /* _TPAM_H_ */ diff --git a/include/linux/key.h b/include/linux/key.h index e693e72..169f05e4 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -177,7 +177,8 @@ struct key { /* * kernel managed key type definition */ -typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op); +typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, + const char *op, void *aux); struct key_type { /* name of the type */ @@ -285,6 +286,11 @@ extern struct key *request_key(struct key_type *type, const char *description, const char *callout_info); +extern struct key *request_key_with_auxdata(struct key_type *type, + const char *description, + const char *callout_info, + void *aux); + extern int key_validate(struct key *key); extern key_ref_t key_create_or_update(key_ref_t keyring, diff --git a/include/linux/pci.h b/include/linux/pci.h index 62a8c22..983fca2 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -404,8 +404,8 @@ int pcibios_enable_device(struct pci_dev *, int mask); char *pcibios_setup (char *str); /* Used only when drivers/pci/setup.c is used */ -void pcibios_align_resource(void *, struct resource *, - unsigned long, unsigned long); +void pcibios_align_resource(void *, struct resource *, resource_size_t, + resource_size_t); void pcibios_update_irq(struct pci_dev *, int irq); /* Generic PCI functions used internally */ @@ -532,10 +532,10 @@ void pci_release_region(struct pci_dev *, int); /* drivers/pci/bus.c */ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, - unsigned long size, unsigned long align, - unsigned long min, unsigned int type_mask, + resource_size_t size, resource_size_t align, + resource_size_t min, unsigned int type_mask, void (*alignf)(void *, struct resource *, - unsigned long, unsigned long), + resource_size_t, resource_size_t), void *alignf_data); void pci_enable_bridges(struct pci_bus *bus); @@ -730,7 +730,8 @@ static inline char *pci_name(struct pci_dev *pdev) */ #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, - const struct resource *rsrc, u64 *start, u64 *end) + const struct resource *rsrc, resource_size_t *start, + resource_size_t *end) { *start = rsrc->start; *end = rsrc->end; diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 93b0959..ab8a8dd 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -389,7 +389,8 @@ int pnp_start_dev(struct pnp_dev *dev); int pnp_stop_dev(struct pnp_dev *dev); int pnp_activate_dev(struct pnp_dev *dev); int pnp_disable_dev(struct pnp_dev *dev); -void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size); +void pnp_resource_change(struct resource *resource, resource_size_t start, + resource_size_t size); /* protocol helpers */ int pnp_is_active(struct pnp_dev * dev); @@ -434,7 +435,9 @@ static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } -static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { } +static inline void pnp_resource_change(struct resource *resource, + resource_size_t start, + resource_size_t size) { } /* protocol helpers */ static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } diff --git a/include/linux/types.h b/include/linux/types.h index a5e46e7..3f23566 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -177,8 +177,15 @@ typedef __u64 __bitwise __be64; #ifdef __KERNEL__ typedef unsigned __bitwise__ gfp_t; + +#ifdef CONFIG_RESOURCES_64BIT +typedef u64 resource_size_t; +#else +typedef u32 resource_size_t; #endif +#endif /* __KERNEL__ */ + struct ustat { __kernel_daddr_t f_tfree; __kernel_ino_t f_tinode; |