From a0d95af5c28666155ad4c85a63a5065436ae1d79 Mon Sep 17 00:00:00 2001 From: Deepak Saxena Date: Mon, 5 Dec 2005 10:54:59 +0000 Subject: [ARM] 3191/1: Mark I/O pointer as const in __raw_reads[bwl] Patch from Deepak Saxena Mark the ioremap'd cookie/pointer in said functions as const since we should not be actualy touching the data. This fixes a slew of compile warnings on IXP4xx as our reads[bwl] already mark this parameter as const. Signed-off-by: Deepak Saxena Signed-off-by: Russell King --- include/asm-arm/io.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index ae69db4a101..0cf4d4f9960 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h @@ -42,9 +42,9 @@ extern void __raw_writesb(void __iomem *addr, const void *data, int bytelen); extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen); extern void __raw_writesl(void __iomem *addr, const void *data, int longlen); -extern void __raw_readsb(void __iomem *addr, void *data, int bytelen); -extern void __raw_readsw(void __iomem *addr, void *data, int wordlen); -extern void __raw_readsl(void __iomem *addr, void *data, int longlen); +extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen); +extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen); +extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); #define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v)) #define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v)) -- cgit v1.2.3 From 31a5539e57fa80e877a2f180cd4ec9ce9de6fea0 Mon Sep 17 00:00:00 2001 From: Hiroki Kaminaga Date: Mon, 5 Dec 2005 10:55:00 +0000 Subject: [ARM] 3194/1: add pfn_to_kaddr macro for ARM take2 Patch from Hiroki Kaminaga This patch defines a new macro: pfn_to_kaddr(pfn). Same macro is already defined on other arch, such as i386. Signed-off-by: Hiroki Kaminaga Signed-off-by: Russell King --- include/asm-arm/memory.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index a547ee598c6..3e572364ee7 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h @@ -122,6 +122,7 @@ static inline void *phys_to_virt(unsigned long x) */ #define __pa(x) __virt_to_phys((unsigned long)(x)) #define __va(x) ((void *)__phys_to_virt((unsigned long)(x))) +#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) /* * Virtual <-> DMA view memory address translations -- cgit v1.2.3 From 1f12bcc9d1840fd26bf577065214f1ebeb2609ba Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 5 Dec 2005 13:42:06 -0800 Subject: [DECNET]: add memory buffer settings The patch (originally from Steve) simply adds memory buffer settings to DECnet similar to those in TCP. Signed-off-by: Patrick Caulfield Signed-off-by: David S. Miller --- include/linux/sysctl.h | 3 +++ include/net/dn.h | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'include') diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 6bc03c911a8..4be34ef8c2f 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -670,6 +670,9 @@ enum { NET_DECNET_DST_GC_INTERVAL = 9, NET_DECNET_CONF = 10, NET_DECNET_NO_FC_MAX_CWND = 11, + NET_DECNET_MEM = 12, + NET_DECNET_RMEM = 13, + NET_DECNET_WMEM = 14, NET_DECNET_DEBUG_LEVEL = 255 }; diff --git a/include/net/dn.h b/include/net/dn.h index c1dbbd22279..a4b6168e1e2 100644 --- a/include/net/dn.h +++ b/include/net/dn.h @@ -234,4 +234,8 @@ extern int decnet_di_count; extern int decnet_dr_count; extern int decnet_no_fc_max_cwnd; +extern int sysctl_decnet_mem[3]; +extern int sysctl_decnet_wmem[3]; +extern int sysctl_decnet_rmem[3]; + #endif /* _NET_DN_H */ -- cgit v1.2.3 From 3ec829b6895092b0686254c315f42642b4a07efc Mon Sep 17 00:00:00 2001 From: John Keller Date: Tue, 29 Nov 2005 16:36:32 -0600 Subject: [IA64-SGI] altix: pci_window fixup Altix only patch to add fixup code that sets up pci_controller->window. This code is a temporary fix until ACPI support on Altix is added. Also, corrects the usage of pci_dev->sysdata, which had previously been used to reference platform specific device info, to now point to a pci_controller struct. Signed-off-by: John Keller Signed-off-by: Tony Luck --- include/asm-ia64/sn/pcidev.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm-ia64/sn/pcidev.h b/include/asm-ia64/sn/pcidev.h index 49711d00ad0..f65d222ca5e 100644 --- a/include/asm-ia64/sn/pcidev.h +++ b/include/asm-ia64/sn/pcidev.h @@ -3,15 +3,27 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. + * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved. */ #ifndef _ASM_IA64_SN_PCI_PCIDEV_H #define _ASM_IA64_SN_PCI_PCIDEV_H #include -#define SN_PCIDEV_INFO(pci_dev) \ - ((struct pcidev_info *)(pci_dev)->sysdata) +/* + * In ia64, pci_dev->sysdata must be a *pci_controller. To provide access to + * the pcidev_info structs for all devices under a controller, we extend the + * definition of pci_controller, via sn_pci_controller, to include a list + * of pcidev_info. + */ +struct sn_pci_controller { + struct pci_controller pci_controller; + struct list_head pcidev_info; +}; + +#define SN_PCI_CONTROLLER(dev) ((struct sn_pci_controller *) dev->sysdata) + +#define SN_PCIDEV_INFO(dev) sn_pcidev_info_get(dev) #define SN_PCIBUS_BUSSOFT_INFO(pci_bus) \ (struct pcibus_info *)((struct pcibus_bussoft *)(PCI_CONTROLLER((pci_bus))->platform_data)) @@ -53,11 +65,13 @@ struct pcidev_info { struct sn_irq_info *pdi_sn_irq_info; struct sn_pcibus_provider *pdi_provider; /* sn pci ops */ struct pci_dev *host_pci_dev; /* host bus link */ + struct list_head pdi_list; /* List of pcidev_info */ }; extern void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info); extern void sn_irq_unfixup(struct pci_dev *pci_dev); +extern struct pcidev_info * sn_pcidev_info_get(struct pci_dev *); extern void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus); extern void sn_bus_store_sysdata(struct pci_dev *dev); -- cgit v1.2.3 From bd1d6e2451f2bb0132416fda4d129c4f57a827bc Mon Sep 17 00:00:00 2001 From: Robin Holt Date: Mon, 5 Dec 2005 20:02:31 -0600 Subject: [IA64] Change SET_PERSONALITY to comply with comment in binfmt_elf.c. We have a customer application which trips a bug. The problem arises when a driver attempts to call do_munmap on an area which is mapped, but because current->thread.task_size has been set to 0xC0000000, the call to do_munmap fails thinking it is an unmap beyond the user's address space. The comment in fs/binfmt_elf.c in load_elf_library() before the call to SET_PERSONALITY() indicates that task_size must not be changed for the running application until flush_thread, but is for ia64 executing ia32 binaries. This patch moves the setting of task_size from SET_PERSONALITY() to flush_thread() as indicated. The customer application no longer is able to trip the bug. Signed-off-by: Robin Holt Signed-off-by: Tony Luck --- include/asm-ia64/ia32.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asm-ia64/ia32.h b/include/asm-ia64/ia32.h index 8e746b2413a..f8044a1169c 100644 --- a/include/asm-ia64/ia32.h +++ b/include/asm-ia64/ia32.h @@ -13,6 +13,8 @@ # ifdef CONFIG_IA32_SUPPORT +#define IA32_PAGE_OFFSET 0xc0000000 + extern void ia32_cpu_init (void); extern void ia32_mem_init (void); extern void ia32_gdt_init (void); -- cgit v1.2.3 From f64fa6772aa874e5cad02a9d87e6b0d99ced3d48 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 7 Dec 2005 11:24:42 -0800 Subject: [IA64] Fix missing parameter for local_add/sub Local add/sub macros need to have a parameter to specify the addend/subtrahend respectively. Signed-off-by: Christoph Lameter Signed-off-by: Tony Luck --- include/asm-ia64/local.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-ia64/local.h b/include/asm-ia64/local.h index 1dbd584ad85..dc519092ef4 100644 --- a/include/asm-ia64/local.h +++ b/include/asm-ia64/local.h @@ -17,8 +17,8 @@ typedef struct { #define local_set(l, i) atomic64_set(&(l)->val, i) #define local_inc(l) atomic64_inc(&(l)->val) #define local_dec(l) atomic64_dec(&(l)->val) -#define local_add(l) atomic64_add(&(l)->val) -#define local_sub(l) atomic64_sub(&(l)->val) +#define local_add(i, l) atomic64_add((i), &(l)->val) +#define local_sub(i, l) atomic64_sub((i), &(l)->val) /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc. */ -- cgit v1.2.3 From 5b35193f5868da5e63f5b4cfe8fbcf9f10fe65cd Mon Sep 17 00:00:00 2001 From: Deepak Saxena Date: Thu, 8 Dec 2005 23:34:44 +0000 Subject: [ARM] 3199/1: Remove bogus function prototype from arch-pxa/irq.h Patch from Deepak Saxena This looks like a leftover from 2.4 days... Signed-off-by: Deepak Saxena Signed-off-by: Russell King --- include/asm-arm/arch-pxa/irq.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-pxa/irq.h b/include/asm-arm/arch-pxa/irq.h index d770e4b37ae..48c60f5eff6 100644 --- a/include/asm-arm/arch-pxa/irq.h +++ b/include/asm-arm/arch-pxa/irq.h @@ -12,8 +12,3 @@ #define fixup_irq(x) (x) -/* - * This prototype is required for cascading of multiplexed interrupts. - * Since it doesn't exist elsewhere, we'll put it here for now. - */ -extern void do_IRQ(int irq, struct pt_regs *regs); -- cgit v1.2.3 From cbf52afdc0eb88492cf7808cc4b4f58a46f1b1ad Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 9 Dec 2005 14:20:52 +1100 Subject: [PATCH] powerpc: Add missing icache flushes for hugepages On most powerpc CPUs, the dcache and icache are not coherent so between writing and executing a page, the caches must be flushed. Userspace programs assume pages given to them by the kernel are icache clean, so we must do this flush between the kernel clearing a page and it being mapped into userspace for execute. We were not doing this for hugepages, this patch corrects the situation. We use the same lazy mechanism as we use for normal pages, delaying the flush until userspace actually attempts to execute from the page in question. Tested on G5. Signed-off-by: David Gibson Signed-off-by: Paul Mackerras --- include/asm-powerpc/mmu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h index c1b4bbabbe9..29b0bb0086d 100644 --- a/include/asm-powerpc/mmu.h +++ b/include/asm-powerpc/mmu.h @@ -220,7 +220,8 @@ extern int __hash_page_64K(unsigned long ea, unsigned long access, unsigned int local); struct mm_struct; extern int hash_huge_page(struct mm_struct *mm, unsigned long access, - unsigned long ea, unsigned long vsid, int local); + unsigned long ea, unsigned long vsid, int local, + unsigned long trap); extern void htab_finish_init(void); extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, -- cgit v1.2.3 From 7fc7e2eeecb599ba719c4c4503100fc8cd6a6920 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 11 Dec 2005 19:57:52 -0800 Subject: Remove (at least temporarily) the "incomplete PFN mapping" support With the previous commit, we can handle arbitrary shared re-mappings even without this complexity, and since the only known private mappings are for strange users of /dev/mem (which never create an incomplete one), there seems to be no reason to support it. Signed-off-by: Linus Torvalds --- include/linux/mm.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/mm.h b/include/linux/mm.h index 29f02d8513f..e5677f45674 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -163,7 +163,6 @@ extern unsigned int kobjsize(const void *objp); #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ -#define VM_INCOMPLETE 0x02000000 /* Strange partial PFN mapping marker */ #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS -- cgit v1.2.3 From bf7ececa9b68f4720f1ce344f442435660bcdae7 Mon Sep 17 00:00:00 2001 From: Keith Owens Date: Sat, 10 Dec 2005 14:24:28 +1100 Subject: [IA64] Define an ia64 version of __raw_read_trylock IA64 is using the generic version of __raw_read_trylock, which always waits for the lock to be free instead of returning when the lock is in use. Define an ia64 version of __raw_read_trylock which behaves correctly, and drop the generic one. Signed-off-by: Keith Owens Signed-off-by: Tony Luck --- include/asm-ia64/spinlock.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-ia64/spinlock.h b/include/asm-ia64/spinlock.h index 5b78611411c..0c91a76c5ea 100644 --- a/include/asm-ia64/spinlock.h +++ b/include/asm-ia64/spinlock.h @@ -201,6 +201,16 @@ static inline void __raw_write_unlock(raw_rwlock_t *x) #endif /* !ASM_SUPPORTED */ -#define __raw_read_trylock(lock) generic__raw_read_trylock(lock) +static inline int __raw_read_trylock(raw_rwlock_t *x) +{ + union { + raw_rwlock_t lock; + __u32 word; + } old, new; + old.lock = new.lock = *x; + old.lock.write_lock = new.lock.write_lock = 0; + ++new.lock.read_counter; + return (u32)ia64_cmpxchg4_acq((__u32 *)(x), new.word, old.word) == old.word; +} #endif /* _ASM_IA64_SPINLOCK_H */ -- cgit v1.2.3 From ab4720ec76b756e1f8705e207a7b392b0453afd6 Mon Sep 17 00:00:00 2001 From: Dipankar Sarma Date: Mon, 12 Dec 2005 00:37:05 -0800 Subject: [PATCH] add rcu_barrier() synchronization point This introduces a new interface - rcu_barrier() which waits until all the RCUs queued until this call have been completed. Reiser4 needs this, because we do more than just freeing memory object in our RCU callback: we also remove it from the list hanging off super-block. This means, that before freeing reiser4-specific portion of super-block (during umount) we have to wait until all pending RCU callbacks are executed. The only change of reiser4 made to the original patch, is exporting of rcu_barrier(). Cc: Hans Reiser Cc: Vladimir V. Saveliev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/rcupdate.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index cce25591eec..a471f3bb713 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -100,6 +100,7 @@ struct rcu_data { struct rcu_head *donelist; struct rcu_head **donetail; int cpu; + struct rcu_head barrier; }; DECLARE_PER_CPU(struct rcu_data, rcu_data); @@ -285,6 +286,7 @@ extern void FASTCALL(call_rcu_bh(struct rcu_head *head, extern __deprecated_for_modules void synchronize_kernel(void); extern void synchronize_rcu(void); void synchronize_idle(void); +extern void rcu_barrier(void); #endif /* __KERNEL__ */ #endif /* __LINUX_RCUPDATE_H */ -- cgit v1.2.3 From 64123fd42c7a1e4ebf6acd2399c98caddc7e0c26 Mon Sep 17 00:00:00 2001 From: Matt Helsley Date: Mon, 12 Dec 2005 00:37:09 -0800 Subject: [PATCH] Add getnstimestamp function There are several functions that might seem appropriate for a timestamp: get_cycles() current_kernel_time() do_gettimeofday() Each has problems with combinations of SMP-safety, low resolution, and monotonicity. This patch adds a new function that returns a monotonic SMP-safe timestamp with nanosecond resolution where available. Changes: Split timestamp into separate patch Moved to kernel/time.c Renamed to getnstimestamp Fixed unintended-pointer-arithmetic bug Signed-off-by: Matt Helsley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/time.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/time.h b/include/linux/time.h index bfbe92d0767..797ccd813bb 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -95,6 +95,7 @@ struct itimerval; extern int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue); extern int do_getitimer(int which, struct itimerval *value); extern void getnstimeofday (struct timespec *tv); +extern void getnstimestamp(struct timespec *ts); extern struct timespec timespec_trunc(struct timespec t, unsigned gran); -- cgit v1.2.3 From 5650b736ad328f7f3e4120e8790940289b8ac144 Mon Sep 17 00:00:00 2001 From: Matt Helsley Date: Mon, 12 Dec 2005 00:37:10 -0800 Subject: [PATCH] Add timestamp field to process events This adds a timestamp field to the events sent via the process event connector. The timestamp allows listeners to accurately account the duration(s) between a process' events and offers strong means with which to determine the order of events with respect to a given task while also avoiding the addition of per-task data. This alters the size and layout of the event structure and hence would break compatibility if process events connector as it stands in 2.6.15-rc2 were released as a mainline kernel. Signed-off-by: Matt Helsley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/cn_proc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h index c948f678e04..1417de93505 100644 --- a/include/linux/cn_proc.h +++ b/include/linux/cn_proc.h @@ -26,6 +26,7 @@ #define CN_PROC_H #include +#include #include /* @@ -65,6 +66,7 @@ struct proc_event { PROC_EVENT_EXIT = 0x80000000 } what; __u32 cpu; + struct timespec timestamp; union { /* must be last field of proc_event struct */ struct { __u32 err; -- cgit v1.2.3 From b88cb42428f14fabdaf947150c00d65891820635 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 12 Dec 2005 00:37:11 -0800 Subject: [PATCH] add hlist_replace_rcu() Add list_replace_rcu: replace old entry by new one. Signed-off-by: Paul E. McKenney Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/list.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/list.h b/include/linux/list.h index fbfca73355a..8e338828453 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -202,12 +202,15 @@ static inline void list_del_rcu(struct list_head *entry) * * The old entry will be replaced with the new entry atomically. */ -static inline void list_replace_rcu(struct list_head *old, struct list_head *new){ +static inline void list_replace_rcu(struct list_head *old, + struct list_head *new) +{ new->next = old->next; new->prev = old->prev; smp_wmb(); new->next->prev = new; new->prev->next = new; + old->prev = LIST_POISON2; } /** @@ -578,6 +581,27 @@ static inline void hlist_del_init(struct hlist_node *n) } } +/* + * hlist_replace_rcu - replace old entry by new one + * @old : the element to be replaced + * @new : the new element to insert + * + * The old entry will be replaced with the new entry atomically. + */ +static inline void hlist_replace_rcu(struct hlist_node *old, + struct hlist_node *new) +{ + struct hlist_node *next = old->next; + + new->next = next; + new->pprev = old->pprev; + smp_wmb(); + if (next) + new->next->pprev = &new->next; + *new->pprev = new; + old->pprev = LIST_POISON2; +} + static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h) { struct hlist_node *first = h->first; -- cgit v1.2.3 From 8140a5005bc6f1c9d0fa103460d50d472e6e3426 Mon Sep 17 00:00:00 2001 From: John McCutchan Date: Mon, 12 Dec 2005 00:37:14 -0800 Subject: [PATCH] inotify: add two inotify_add_watch flags The below patch lets userspace have more control over the inodes that inotify will watch. It introduces two new flags. IN_ONLYDIR -- only watch the inode if it is a directory. This is needed to avoid the race that can occur when we want to be sure that we are watching a directory. IN_DONT_FOLLOW -- don't follow a symlink. In combination with IN_ONLYDIR we can make sure that we don't watch the target of symlinks. The issues the flags fix came up when writing the gnome-vfs inotify backend. Default behaviour is unchanged. Signed-off-by: John McCutchan Acked-by: Robert Love Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/inotify.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/inotify.h b/include/linux/inotify.h index ee5b239092e..267c88b5f74 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h @@ -47,6 +47,8 @@ struct inotify_event { #define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */ /* special flags */ +#define IN_ONLYDIR 0x01000000 /* only watch the path if it is a directory */ +#define IN_DONT_FOLLOW 0x02000000 /* don't follow a sym link */ #define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */ #define IN_ISDIR 0x40000000 /* event occurred against dir */ #define IN_ONESHOT 0x80000000 /* only send event once */ -- cgit v1.2.3 From afd1a0c9ac281eed3b22b293ccd92af7b0d60889 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 12 Dec 2005 00:37:27 -0800 Subject: [PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 3 Clean up whitespaces at v4l/dvb files Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/dvb/audio.h | 28 +++++++++++----------- include/linux/dvb/ca.h | 36 ++++++++++++++-------------- include/linux/dvb/dmx.h | 20 ++++++++-------- include/linux/dvb/osd.h | 58 +++++++++++++++++++++++----------------------- include/linux/dvb/video.h | 44 +++++++++++++++++------------------ include/media/saa7146.h | 4 ++-- include/media/saa7146_vv.h | 10 ++++---- 7 files changed, 100 insertions(+), 100 deletions(-) (limited to 'include') diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h index cc314443f1c..2b879708468 100644 --- a/include/linux/dvb/audio.h +++ b/include/linux/dvb/audio.h @@ -32,39 +32,39 @@ typedef enum { - AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */ + AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */ AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */ } audio_stream_source_t; typedef enum { AUDIO_STOPPED, /* Device is stopped */ - AUDIO_PLAYING, /* Device is currently playing */ + AUDIO_PLAYING, /* Device is currently playing */ AUDIO_PAUSED /* Device is paused */ } audio_play_state_t; typedef enum { - AUDIO_STEREO, - AUDIO_MONO_LEFT, + AUDIO_STEREO, + AUDIO_MONO_LEFT, AUDIO_MONO_RIGHT } audio_channel_select_t; typedef struct audio_mixer { - unsigned int volume_left; - unsigned int volume_right; + unsigned int volume_left; + unsigned int volume_right; // what else do we need? bass, pass-through, ... } audio_mixer_t; typedef struct audio_status { - int AV_sync_state; /* sync audio and video? */ - int mute_state; /* audio is muted */ - audio_play_state_t play_state; /* current playback state */ - audio_stream_source_t stream_source; /* current stream source */ - audio_channel_select_t channel_select; /* currently selected channel */ - int bypass_mode; /* pass on audio data to */ + int AV_sync_state; /* sync audio and video? */ + int mute_state; /* audio is muted */ + audio_play_state_t play_state; /* current playback state */ + audio_stream_source_t stream_source; /* current stream source */ + audio_channel_select_t channel_select; /* currently selected channel */ + int bypass_mode; /* pass on audio data to */ audio_mixer_t mixer_state; /* current mixer state */ } audio_status_t; /* separate decoder hardware */ @@ -74,8 +74,8 @@ struct audio_karaoke{ /* if Vocal1 or Vocal2 are non-zero, they get mixed */ int vocal1; /* into left and right t at 70% each */ int vocal2; /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/ int melody; /* mixed into the left channel and */ - /* Vocal2 into the right channel at 100% each. */ - /* if Melody is non-zero, the melody channel gets mixed*/ + /* Vocal2 into the right channel at 100% each. */ + /* if Melody is non-zero, the melody channel gets mixed*/ } audio_karaoke_t; /* into left and right */ diff --git a/include/linux/dvb/ca.h b/include/linux/dvb/ca.h index 558af0cc769..c18537f3e44 100644 --- a/include/linux/dvb/ca.h +++ b/include/linux/dvb/ca.h @@ -27,16 +27,16 @@ /* slot interface types and info */ typedef struct ca_slot_info { - int num; /* slot number */ + int num; /* slot number */ - int type; /* CA interface this slot supports */ + int type; /* CA interface this slot supports */ #define CA_CI 1 /* CI high level interface */ #define CA_CI_LINK 2 /* CI link layer level interface */ #define CA_CI_PHYS 4 /* CI physical layer level interface */ #define CA_DESCR 8 /* built-in descrambler */ #define CA_SC 128 /* simple smart card interface */ - unsigned int flags; + unsigned int flags; #define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */ #define CA_CI_MODULE_READY 2 } ca_slot_info_t; @@ -45,37 +45,37 @@ typedef struct ca_slot_info { /* descrambler types and info */ typedef struct ca_descr_info { - unsigned int num; /* number of available descramblers (keys) */ - unsigned int type; /* type of supported scrambling system */ + unsigned int num; /* number of available descramblers (keys) */ + unsigned int type; /* type of supported scrambling system */ #define CA_ECD 1 #define CA_NDS 2 #define CA_DSS 4 } ca_descr_info_t; typedef struct ca_caps { - unsigned int slot_num; /* total number of CA card and module slots */ - unsigned int slot_type; /* OR of all supported types */ - unsigned int descr_num; /* total number of descrambler slots (keys) */ - unsigned int descr_type; /* OR of all supported types */ + unsigned int slot_num; /* total number of CA card and module slots */ + unsigned int slot_type; /* OR of all supported types */ + unsigned int descr_num; /* total number of descrambler slots (keys) */ + unsigned int descr_type; /* OR of all supported types */ } ca_caps_t; /* a message to/from a CI-CAM */ typedef struct ca_msg { - unsigned int index; - unsigned int type; - unsigned int length; - unsigned char msg[256]; + unsigned int index; + unsigned int type; + unsigned int length; + unsigned char msg[256]; } ca_msg_t; typedef struct ca_descr { - unsigned int index; - unsigned int parity; /* 0 == even, 1 == odd */ - unsigned char cw[8]; + unsigned int index; + unsigned int parity; /* 0 == even, 1 == odd */ + unsigned char cw[8]; } ca_descr_t; typedef struct ca_pid { - unsigned int pid; - int index; /* -1 == disable*/ + unsigned int pid; + int index; /* -1 == disable*/ } ca_pid_t; #define CA_RESET _IO('o', 128) diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index ce3f829da82..263e9e19f77 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h @@ -1,4 +1,4 @@ -/* +/* * dmx.h * * Copyright (C) 2000 Marcus Metzler @@ -38,10 +38,10 @@ typedef enum { DMX_OUT_DECODER, /* Streaming directly to decoder. */ DMX_OUT_TAP, /* Output going to a memory buffer */ - /* (to be retrieved via the read command).*/ + /* (to be retrieved via the read command).*/ DMX_OUT_TS_TAP /* Output multiplexed into a new TS */ - /* (to be retrieved by reading from the */ - /* logical DVR device). */ + /* (to be retrieved by reading from the */ + /* logical DVR device). */ } dmx_output_t; @@ -54,25 +54,25 @@ typedef enum typedef enum { - DMX_PES_AUDIO0, + DMX_PES_AUDIO0, DMX_PES_VIDEO0, DMX_PES_TELETEXT0, DMX_PES_SUBTITLE0, DMX_PES_PCR0, - DMX_PES_AUDIO1, + DMX_PES_AUDIO1, DMX_PES_VIDEO1, DMX_PES_TELETEXT1, DMX_PES_SUBTITLE1, DMX_PES_PCR1, - DMX_PES_AUDIO2, + DMX_PES_AUDIO2, DMX_PES_VIDEO2, DMX_PES_TELETEXT2, DMX_PES_SUBTITLE2, DMX_PES_PCR2, - DMX_PES_AUDIO3, + DMX_PES_AUDIO3, DMX_PES_VIDEO3, DMX_PES_TELETEXT3, DMX_PES_SUBTITLE3, @@ -90,8 +90,8 @@ typedef enum typedef enum { - DMX_SCRAMBLING_EV, - DMX_FRONTEND_EV + DMX_SCRAMBLING_EV, + DMX_FRONTEND_EV } dmx_event_t; diff --git a/include/linux/dvb/osd.h b/include/linux/dvb/osd.h index 0e1973d54a6..880e6843583 100644 --- a/include/linux/dvb/osd.h +++ b/include/linux/dvb/osd.h @@ -98,43 +98,43 @@ typedef enum { } OSD_Command; typedef struct osd_cmd_s { - OSD_Command cmd; - int x0; - int y0; - int x1; - int y1; - int color; - void __user *data; + OSD_Command cmd; + int x0; + int y0; + int x1; + int y1; + int color; + void __user *data; } osd_cmd_t; /* OSD_OpenRaw: set 'color' to desired window type */ typedef enum { - OSD_BITMAP1, /* 1 bit bitmap */ - OSD_BITMAP2, /* 2 bit bitmap */ - OSD_BITMAP4, /* 4 bit bitmap */ - OSD_BITMAP8, /* 8 bit bitmap */ - OSD_BITMAP1HR, /* 1 Bit bitmap half resolution */ - OSD_BITMAP2HR, /* 2 bit bitmap half resolution */ - OSD_BITMAP4HR, /* 4 bit bitmap half resolution */ - OSD_BITMAP8HR, /* 8 bit bitmap half resolution */ - OSD_YCRCB422, /* 4:2:2 YCRCB Graphic Display */ - OSD_YCRCB444, /* 4:4:4 YCRCB Graphic Display */ - OSD_YCRCB444HR, /* 4:4:4 YCRCB graphic half resolution */ - OSD_VIDEOTSIZE, /* True Size Normal MPEG Video Display */ - OSD_VIDEOHSIZE, /* MPEG Video Display Half Resolution */ - OSD_VIDEOQSIZE, /* MPEG Video Display Quarter Resolution */ - OSD_VIDEODSIZE, /* MPEG Video Display Double Resolution */ - OSD_VIDEOTHSIZE, /* True Size MPEG Video Display Half Resolution */ - OSD_VIDEOTQSIZE, /* True Size MPEG Video Display Quarter Resolution*/ - OSD_VIDEOTDSIZE, /* True Size MPEG Video Display Double Resolution */ - OSD_VIDEONSIZE, /* Full Size MPEG Video Display */ - OSD_CURSOR /* Cursor */ + OSD_BITMAP1, /* 1 bit bitmap */ + OSD_BITMAP2, /* 2 bit bitmap */ + OSD_BITMAP4, /* 4 bit bitmap */ + OSD_BITMAP8, /* 8 bit bitmap */ + OSD_BITMAP1HR, /* 1 Bit bitmap half resolution */ + OSD_BITMAP2HR, /* 2 bit bitmap half resolution */ + OSD_BITMAP4HR, /* 4 bit bitmap half resolution */ + OSD_BITMAP8HR, /* 8 bit bitmap half resolution */ + OSD_YCRCB422, /* 4:2:2 YCRCB Graphic Display */ + OSD_YCRCB444, /* 4:4:4 YCRCB Graphic Display */ + OSD_YCRCB444HR, /* 4:4:4 YCRCB graphic half resolution */ + OSD_VIDEOTSIZE, /* True Size Normal MPEG Video Display */ + OSD_VIDEOHSIZE, /* MPEG Video Display Half Resolution */ + OSD_VIDEOQSIZE, /* MPEG Video Display Quarter Resolution */ + OSD_VIDEODSIZE, /* MPEG Video Display Double Resolution */ + OSD_VIDEOTHSIZE, /* True Size MPEG Video Display Half Resolution */ + OSD_VIDEOTQSIZE, /* True Size MPEG Video Display Quarter Resolution*/ + OSD_VIDEOTDSIZE, /* True Size MPEG Video Display Double Resolution */ + OSD_VIDEONSIZE, /* Full Size MPEG Video Display */ + OSD_CURSOR /* Cursor */ } osd_raw_window_t; typedef struct osd_cap_s { - int cmd; + int cmd; #define OSD_CAP_MEMSIZE 1 /* memory size */ - long val; + long val; } osd_cap_t; diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 941045e9ab8..2e15051b234 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h @@ -36,7 +36,7 @@ typedef enum { VIDEO_FORMAT_4_3, /* Select 4:3 format */ - VIDEO_FORMAT_16_9, /* Select 16:9 format. */ + VIDEO_FORMAT_16_9, /* Select 16:9 format. */ VIDEO_FORMAT_221_1 /* 2.21:1 */ } video_format_t; @@ -54,7 +54,7 @@ typedef enum { typedef enum { - VIDEO_PAN_SCAN, /* use pan and scan format */ + VIDEO_PAN_SCAN, /* use pan and scan format */ VIDEO_LETTER_BOX, /* use letterbox format */ VIDEO_CENTER_CUT_OUT /* use center cut out format */ } video_displayformat_t; @@ -66,7 +66,7 @@ typedef struct { } video_size_t; typedef enum { - VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ + VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ VIDEO_SOURCE_MEMORY /* If this source is selected, the stream comes from the user through the write system call */ @@ -75,35 +75,35 @@ typedef enum { typedef enum { VIDEO_STOPPED, /* Video is stopped */ - VIDEO_PLAYING, /* Video is currently playing */ + VIDEO_PLAYING, /* Video is currently playing */ VIDEO_FREEZED /* Video is freezed */ } video_play_state_t; struct video_event { - int32_t type; + int32_t type; #define VIDEO_EVENT_SIZE_CHANGED 1 #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 - time_t timestamp; + time_t timestamp; union { - video_size_t size; + video_size_t size; unsigned int frame_rate; /* in frames per 1000sec */ } u; }; struct video_status { - int video_blank; /* blank video on freeze? */ - video_play_state_t play_state; /* current state of playback */ - video_stream_source_t stream_source; /* current source (demux/memory) */ - video_format_t video_format; /* current aspect ratio of stream*/ - video_displayformat_t display_format;/* selected cropping mode */ + int video_blank; /* blank video on freeze? */ + video_play_state_t play_state; /* current state of playback */ + video_stream_source_t stream_source; /* current source (demux/memory) */ + video_format_t video_format; /* current aspect ratio of stream*/ + video_displayformat_t display_format;/* selected cropping mode */ }; struct video_still_picture { - char __user *iFrame; /* pointer to a single iframe in memory */ - int32_t size; + char __user *iFrame; /* pointer to a single iframe in memory */ + int32_t size; }; @@ -111,19 +111,19 @@ typedef struct video_highlight { int active; /* 1=show highlight, 0=hide highlight */ uint8_t contrast1; /* 7- 4 Pattern pixel contrast */ - /* 3- 0 Background pixel contrast */ + /* 3- 0 Background pixel contrast */ uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */ - /* 3- 0 Emphasis pixel-1 contrast */ + /* 3- 0 Emphasis pixel-1 contrast */ uint8_t color1; /* 7- 4 Pattern pixel color */ - /* 3- 0 Background pixel color */ + /* 3- 0 Background pixel color */ uint8_t color2; /* 7- 4 Emphasis pixel-2 color */ - /* 3- 0 Emphasis pixel-1 color */ + /* 3- 0 Emphasis pixel-1 color */ uint32_t ypos; /* 23-22 auto action mode */ - /* 21-12 start y */ - /* 9- 0 end y */ + /* 21-12 start y */ + /* 9- 0 end y */ uint32_t xpos; /* 23-22 button color number */ - /* 21-12 start x */ - /* 9- 0 end x */ + /* 21-12 start x */ + /* 9- 0 end x */ } video_highlight_t; diff --git a/include/media/saa7146.h b/include/media/saa7146.h index 2a897c3a6a9..101f56c8a64 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h @@ -112,7 +112,7 @@ struct saa7146_dev /* different device locks */ spinlock_t slock; - struct semaphore lock; + struct semaphore lock; unsigned char __iomem *mem; /* pointer to mapped IO memory */ int revision; /* chip revision; needed for bug-workarounds*/ @@ -133,7 +133,7 @@ struct saa7146_dev void (*vv_callback)(struct saa7146_dev *dev, unsigned long status); /* i2c-stuff */ - struct semaphore i2c_lock; + struct semaphore i2c_lock; u32 i2c_bitrate; struct saa7146_dma d_i2c; /* pointer to i2c memory */ wait_queue_head_t i2c_wq; diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 64691753721..16af9299315 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h @@ -113,7 +113,7 @@ struct saa7146_vv /* vbi capture */ struct saa7146_dmaqueue vbi_q; /* vbi workaround interrupt queue */ - wait_queue_head_t vbi_wq; + wait_queue_head_t vbi_wq; int vbi_fieldcount; struct saa7146_fh *vbi_streaming; @@ -181,10 +181,10 @@ struct saa7146_ext_vv }; struct saa7146_use_ops { - void (*init)(struct saa7146_dev *, struct saa7146_vv *); - int(*open)(struct saa7146_dev *, struct file *); - void (*release)(struct saa7146_dev *, struct file *); - void (*irq_done)(struct saa7146_dev *, unsigned long status); + void (*init)(struct saa7146_dev *, struct saa7146_vv *); + int(*open)(struct saa7146_dev *, struct file *); + void (*release)(struct saa7146_dev *, struct file *); + void (*irq_done)(struct saa7146_dev *, unsigned long status); ssize_t (*read)(struct file *, char __user *, size_t, loff_t *); }; -- cgit v1.2.3 From 674434c691e10015660022fc00b04985a23ef87b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 12 Dec 2005 00:37:28 -0800 Subject: [PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 4 Clean up whitespaces at v4l/dvb files Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/dvb/dmx.h | 6 +++--- include/linux/dvb/video.h | 16 ++++++++-------- include/media/saa7146.h | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index 263e9e19f77..2787b8a22ff 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h @@ -38,10 +38,10 @@ typedef enum { DMX_OUT_DECODER, /* Streaming directly to decoder. */ DMX_OUT_TAP, /* Output going to a memory buffer */ - /* (to be retrieved via the read command).*/ + /* (to be retrieved via the read command).*/ DMX_OUT_TS_TAP /* Output multiplexed into a new TS */ - /* (to be retrieved by reading from the */ - /* logical DVR device). */ + /* (to be retrieved by reading from the */ + /* logical DVR device). */ } dmx_output_t; diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 2e15051b234..b1999bfeaa5 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h @@ -111,19 +111,19 @@ typedef struct video_highlight { int active; /* 1=show highlight, 0=hide highlight */ uint8_t contrast1; /* 7- 4 Pattern pixel contrast */ - /* 3- 0 Background pixel contrast */ + /* 3- 0 Background pixel contrast */ uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */ - /* 3- 0 Emphasis pixel-1 contrast */ + /* 3- 0 Emphasis pixel-1 contrast */ uint8_t color1; /* 7- 4 Pattern pixel color */ - /* 3- 0 Background pixel color */ + /* 3- 0 Background pixel color */ uint8_t color2; /* 7- 4 Emphasis pixel-2 color */ - /* 3- 0 Emphasis pixel-1 color */ + /* 3- 0 Emphasis pixel-1 color */ uint32_t ypos; /* 23-22 auto action mode */ - /* 21-12 start y */ - /* 9- 0 end y */ + /* 21-12 start y */ + /* 9- 0 end y */ uint32_t xpos; /* 23-22 button color number */ - /* 21-12 start x */ - /* 9- 0 end x */ + /* 21-12 start x */ + /* 9- 0 end x */ } video_highlight_t; diff --git a/include/media/saa7146.h b/include/media/saa7146.h index 101f56c8a64..e5be2b9b846 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h @@ -14,7 +14,7 @@ #include /* for vmalloc() */ #include /* for vmalloc_to_page() */ -#define SAA7146_VERSION_CODE 0x000500 /* 0.5.0 */ +#define SAA7146_VERSION_CODE 0x000500 /* 0.5.0 */ #define saa7146_write(sxy,adr,dat) writel((dat),(sxy->mem+(adr))) #define saa7146_read(sxy,adr) readl(sxy->mem+(adr)) -- cgit v1.2.3 From dd815408106f3c56c3050493dda97f9355aa4971 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 12 Dec 2005 00:37:31 -0800 Subject: [PATCH] V4L/DVB: (3151) I2C ID renamed to I2C_DRIVERID_INFRARED I2C ID renamed to I2C_DRIVERID_INFRARED Acked-off-by: Jean Delvare Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/i2c-id.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index ef3b5632e63..006c81ef4d5 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -108,7 +108,7 @@ #define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */ #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ -#define I2C_DRIVERID_I2C_IR 75 /* I2C InfraRed on Video boards */ +#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ #define I2C_DRIVERID_EXP1 0xF1 -- cgit v1.2.3 From 00d7c05ab168c10f9b520e07400923267bc04419 Mon Sep 17 00:00:00 2001 From: Keshavamurthy Anil S Date: Mon, 12 Dec 2005 00:37:33 -0800 Subject: [PATCH] kprobes: no probes on critical path For Kprobes critical path is the path from debug break exception handler till the control reaches kprobes exception code. No probes can be supported in this path as we will end up in recursion. This patch prevents this by moving the below function to safe __kprobes section onto which no probes can be inserted. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/kprobes.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index e373c4a9de5..434ecfd7cf4 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -37,6 +37,7 @@ #include #include +#ifdef CONFIG_KPROBES #include /* kprobe_status settings */ @@ -147,7 +148,6 @@ struct kretprobe_instance { struct task_struct *task; }; -#ifdef CONFIG_KPROBES extern spinlock_t kretprobe_lock; extern int arch_prepare_kprobe(struct kprobe *p); extern void arch_copy_kprobe(struct kprobe *p); @@ -195,6 +195,11 @@ void add_rp_inst(struct kretprobe_instance *ri); void kprobe_flush_task(struct task_struct *tk); void recycle_rp_inst(struct kretprobe_instance *ri); #else /* CONFIG_KPROBES */ + +#define __kprobes /**/ +struct jprobe; +struct kretprobe; + static inline struct kprobe *kprobe_running(void) { return NULL; -- cgit v1.2.3 From bf8d5c52c3b6b27061e3b7d779057fd9a6cac164 Mon Sep 17 00:00:00 2001 From: Keshavamurthy Anil S Date: Mon, 12 Dec 2005 00:37:34 -0800 Subject: [PATCH] kprobes: increment kprobe missed count for multiprobes When multiple probes are registered at the same address and if due to some recursion (probe getting triggered within a probe handler), we skip calling pre_handlers and just increment nmissed field. The below patch make sure it walks the list for multiple probes case. Without the below patch we get incorrect results of nmissed count for multiple probe case. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/kprobes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 434ecfd7cf4..c03f2dc933d 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -158,6 +158,7 @@ extern int arch_init_kprobes(void); extern void show_registers(struct pt_regs *regs); extern kprobe_opcode_t *get_insn_slot(void); extern void free_insn_slot(kprobe_opcode_t *slot); +extern void kprobes_inc_nmissed_count(struct kprobe *p); /* Get the kprobe at this addr (if any) - called with preemption disabled */ struct kprobe *get_kprobe(void *addr); -- cgit v1.2.3 From 68799398cea44b81d1e919f842d8d84d471053d5 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Mon, 12 Dec 2005 00:37:35 -0800 Subject: [PATCH] broken cast in parport_pc Spotted by a Fedora user. Compiling with DEBUG_PARPORT set fails due to the broken cast. Just remove it. Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/parport_pc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/parport_pc.h b/include/linux/parport_pc.h index 7825c76cbd0..c6f76247087 100644 --- a/include/linux/parport_pc.h +++ b/include/linux/parport_pc.h @@ -86,7 +86,7 @@ extern __inline__ void dump_parport_state (char *str, struct parport *p) unsigned char dcr = inb (CONTROL (p)); unsigned char dsr = inb (STATUS (p)); static char *ecr_modes[] = {"SPP", "PS2", "PPFIFO", "ECP", "xXx", "yYy", "TST", "CFG"}; - const struct parport_pc_private *priv = (parport_pc_private *)p->physport->private_data; + const struct parport_pc_private *priv = p->physport->private_data; int i; printk (KERN_DEBUG "*** parport state (%s): ecr=[%s", str, ecr_modes[(ecr & 0xe0) >> 5]); -- cgit v1.2.3 From 4743484718e1d710321f24f8ef7d0124a48291b3 Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Mon, 12 Dec 2005 22:17:16 -0800 Subject: [PATCH] fbcon: Add ability to save/restore graphics state Add hooks to save and restore the graphics state. These hooks are called in fbcon_blank() when entering/leaving KD_GRAPHICS mode. This is needed by savagefb at least so it can cooperate with savage_dri and by cyblafb. State save/restoration can be full or partial. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/fb.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/linux/fb.h b/include/linux/fb.h index 04a58f33ec5..55ccaf3706c 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -617,6 +617,12 @@ struct fb_ops { /* perform fb specific mmap */ int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); + + /* save current hardware state */ + void (*fb_save_state)(struct fb_info *info); + + /* restore saved state */ + void (*fb_restore_state)(struct fb_info *info); }; #ifdef CONFIG_FB_TILEBLITTING -- cgit v1.2.3 From 39942fd8ff57c8623451bbfaffe8a184cc8b463a Mon Sep 17 00:00:00 2001 From: Knut Petersen Date: Mon, 12 Dec 2005 22:17:19 -0800 Subject: [PATCH] fbdev: fix switch to KD_TEXT, enhanced version Every framebuffer driver relies on the assumption that the set_par() function of the driver is called before drawing functions and other functions dependent on the hardware state are executed. Whenever you switch from X to a framebuffer console for the very first time, there is a chance that a broken X system has _not_ set the mode to KD_GRAPHICS, thus the vt and framebuffer code executes a screen redraw and several other functions before a set_par() is executed. This is believed to be not a bug of linux but a bug of X/xdm. At least some X releases used by SuSE and Debian show this behaviour. There was a 2nd case, but that has been fixed by Antonino Daplas on 10-dec-2005. This patch allows drivers to set a flag to inform fbcon_switch() that they prefer a set_par() call on every console switch, working around the problems caused by the broken X releases. The flag will be used by the next release of cyblafb and might help other drivers that assume a hardware state different to the one used by X. As the default behaviour does not change, this patch should be acceptable to everybody. Signed-off-by: Knut Petersen Acked-by: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/fb.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/linux/fb.h b/include/linux/fb.h index 55ccaf3706c..dab3a4decb4 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -732,6 +732,18 @@ struct fb_tile_ops { from userspace */ #define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ +/* A driver may set this flag to indicate that it does want a set_par to be + * called every time when fbcon_switch is executed. The advantage is that with + * this flag set you can really be shure that set_par is always called before + * any of the functions dependant on the correct hardware state or altering + * that state, even if you are using some broken X releases. The disadvantage + * is that it introduces unwanted delays to every console switch if set_par + * is slow. It is a good idea to try this flag in the drivers initialization + * code whenever there is a bug report related to switching between X and the + * framebuffer console. + */ +#define FBINFO_MISC_ALWAYS_SETPAR 0x40000 + struct fb_info { int node; int flags; -- cgit v1.2.3 From be0d9b6c7aeaad1683059c00131cabd4c894c17c Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Mon, 12 Dec 2005 22:17:21 -0800 Subject: [PATCH] fbdev: Fix incorrect unaligned access in little-endian machines The drawing function cfbfillrect does not work correctly when access is not unsigned-long aligned. It manifests as extra lines of pixels that are not complete drawn. Reversing the shift operator solves the problem, so I would presume that this bug would manifest only on little endian machines. The function cfbcopyarea may also have this bug. Aligned access should present no problems. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/fb.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/linux/fb.h b/include/linux/fb.h index dab3a4decb4..a973be2cfe6 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -833,6 +833,18 @@ struct fb_info { #define fb_writeq(b,addr) (*(volatile u64 *) (addr) = (b)) #define fb_memset memset +#endif + +#if defined (__BIG_ENDIAN) +#define FB_LEFT_POS(bpp) (32 - bpp) +#define FB_SHIFT_HIGH(val, bits) ((val) >> (bits)) +#define FB_SHIFT_LOW(val, bits) ((val) << (bits)) +#define FB_BIT_NR(b) (7 - (b)) +#else +#define FB_LEFT_POS(bpp) (0) +#define FB_SHIFT_HIGH(val, bits) ((val) << (bits)) +#define FB_SHIFT_LOW(val, bits) ((val) >> (bits)) +#define FB_BIT_NR(b) (b) #endif /* -- cgit v1.2.3 From 50630195bbdfe1ca775d94cd68a5f18bc1b717e4 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Tue, 13 Dec 2005 02:29:45 -0500 Subject: [libata] mark certain hardware (or drivers) with a no-atapi flag Some hardware does not support the PACKET command at all. Other hardware supports ATAPI, but the driver does something nasty such as calling BUG() when an ATAPI command is issued. For these such cases, we mark them with a new flag, ATA_FLAG_NO_ATAPI. Initial version contributed by Ben Collins. --- include/linux/libata.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/libata.h b/include/linux/libata.h index f2dbb684ce9..41ea7dbc175 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -122,6 +122,7 @@ enum { ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once * proper HSM is in place. */ ATA_FLAG_DEBUGMSG = (1 << 10), + ATA_FLAG_NO_ATAPI = (1 << 11), /* No ATAPI support */ ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ -- cgit v1.2.3 From eed66cfcbbea851c97e287440d940286fce3f829 Mon Sep 17 00:00:00 2001 From: Tony Luck Date: Tue, 13 Dec 2005 10:41:49 -0800 Subject: [IA64] Split 16-bit severity field in sal_log_record_header ERR_SEVERITY item is defined as a 8 bits item in SAL documentation ($B.2.1 rev december 2003), but as an u16 in sal.h. This has the side effect that current code in mca.c may not call ia64_sal_clear_state_info() upon receiving corrected platform errors if there are bits set in the validation byte. Reported by Xavier Bru. Signed-off-by: Tony Luck --- include/asm-ia64/sal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h index 29df88bdd2b..313cad0628d 100644 --- a/include/asm-ia64/sal.h +++ b/include/asm-ia64/sal.h @@ -320,7 +320,8 @@ typedef struct sal_log_timestamp { typedef struct sal_log_record_header { u64 id; /* Unique monotonically increasing ID */ sal_log_revision_t revision; /* Major and Minor revision of header */ - u16 severity; /* Error Severity */ + u8 severity; /* Error Severity */ + u8 validation_bits; /* 0: platform_guid, 1: !timestamp */ u32 len; /* Length of this error log in bytes */ sal_log_timestamp_t timestamp; /* Timestamp */ efi_guid_t platform_guid; /* Unique OEM Platform ID */ -- cgit v1.2.3 From c9526497cf03ee775c3a6f8ba62335735f98de7a Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Fri, 9 Dec 2005 17:45:22 -0500 Subject: [SCSI] Consolidate REQ_BLOCK_PC handling path (fix ipod panic) This follows on from Jens' patch and consolidates all of the ULD separate handlers for REQ_BLOCK_PC into a single call which has his fix for our direction bug. Signed-off-by: James Bottomley --- include/scsi/scsi_cmnd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 7529f4388bb..20da282d4ab 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -151,5 +151,6 @@ extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); extern void scsi_put_command(struct scsi_cmnd *); extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int); extern void scsi_finish_command(struct scsi_cmnd *cmd); +extern void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd, int retries); #endif /* _SCSI_SCSI_CMND_H */ -- cgit v1.2.3 From c2e2611425a956d25d2948c5d95d3848c4db1257 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 14 Dec 2005 22:04:22 +0000 Subject: [ARM] 3205/1: Handle new EABI relocations when loading kernel modules. Patch from Daniel Jacobowitz Handle new EABI relocations when loading kernel modules. This is necessary for CONFIG_AEABI kernels, and also for some broken (since fixed) old ABI toolchains. Signed-off-by: Daniel Jacobowitz Signed-off-by: Russell King --- include/asm-arm/elf.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index 7da97a93754..2d44b42d184 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h @@ -22,6 +22,8 @@ typedef unsigned long elf_freg_t[3]; #define R_ARM_NONE 0 #define R_ARM_PC24 1 #define R_ARM_ABS32 2 +#define R_ARM_CALL 28 +#define R_ARM_JUMP24 29 #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -- cgit v1.2.3 From ceef833bae05e393859f1946a9802fb61f0febdf Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Thu, 15 Dec 2005 02:11:55 +0100 Subject: [PATCH] via82cxxx IDE: Add VT8251 ISA bridge Some motherboards (such as the Asus P5V800-MX) ship a PCI_DEVICE_ID_VIA_82C586_1 IDE controller alongside a VT8251 southbridge. This southbridge is currently unrecognised in the via82cxxx IDE driver, preventing those users from getting DMA access to disks. Signed-off-by: Daniel Drake Signed-off-by: Bartlomiej Zolnierkiewicz --- include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 1e737e269db..4db67b3b05c 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1244,6 +1244,7 @@ #define PCI_DEVICE_ID_VIA_8378_0 0x3205 #define PCI_DEVICE_ID_VIA_8783_0 0x3208 #define PCI_DEVICE_ID_VIA_8237 0x3227 +#define PCI_DEVICE_ID_VIA_8251 0x3287 #define PCI_DEVICE_ID_VIA_3296_0 0x0296 #define PCI_DEVICE_ID_VIA_8231 0x8231 #define PCI_DEVICE_ID_VIA_8231_4 0x8235 -- cgit v1.2.3 From 65e5f2e3b457b6b20a5c4481312189d141a33d24 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Thu, 15 Dec 2005 02:16:18 +0100 Subject: [PATCH] ide: core modifications for AU1200 bart: slightly modified by me Signed-off-by: Jordan Crouse Signed-off-by: Bartlomiej Zolnierkiewicz --- include/asm-mips/mach-au1x00/au1xxx_ide.h | 5 ----- include/linux/ide.h | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h index 33d275c3b84..0c3c127e619 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_ide.h +++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h @@ -87,11 +87,6 @@ typedef struct } _auide_hwif; #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA -struct drive_list_entry { - const char * id_model; - const char * id_firmware; -}; - /* HD white list */ static const struct drive_list_entry dma_white_list [] = { /* diff --git a/include/linux/ide.h b/include/linux/ide.h index a39c3c59789..a6b28dcf8f0 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1371,6 +1371,12 @@ void ide_init_sg_cmd(ide_drive_t *, struct request *); #define GOOD_DMA_DRIVE 1 #ifdef CONFIG_BLK_DEV_IDEDMA +struct drive_list_entry { + const char *id_model; + const char *id_firmware; +}; + +int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); int __ide_dma_bad_drive(ide_drive_t *); int __ide_dma_good_drive(ide_drive_t *); int ide_use_dma(ide_drive_t *); -- cgit v1.2.3 From 8f29e650bffc1e22ed6b2d0b321bc77627f3bb7a Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Thu, 15 Dec 2005 02:17:46 +0100 Subject: [PATCH] ide: AU1200 IDE update Changes here include removing all of CONFIG_PM while it is being repeatedly smacked with a lead pipe, moving the BURSTMODE param to a #define (it should be defined almost always anyway), fixing the rqsize stuff, pulling ide_ioreg_t, and general cleanups and whatnot. Signed-off-by: Jordan Crouse Signed-off-by: Bartlomiej Zolnierkiewicz --- include/asm-mips/mach-au1x00/au1xxx_ide.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h index 0c3c127e619..e867b4ef96d 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_ide.h +++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h @@ -74,9 +74,6 @@ typedef struct u8 white_list, black_list; struct dbdma_cmd *dma_table_cpu; dma_addr_t dma_table_dma; - struct scatterlist *sg_table; - int sg_nents; - int sg_dma_direction; #endif struct device *dev; int irq; @@ -162,13 +159,9 @@ int __init auide_probe(void); * Multi-Word DMA + DbDMA functions */ #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA - - static int in_drive_list(struct hd_driveid *id, - const struct drive_list_entry *drive_table); static int auide_build_sglist(ide_drive_t *drive, struct request *rq); static int auide_build_dmatable(ide_drive_t *drive); static int auide_dma_end(ide_drive_t *drive); - static void auide_dma_start(ide_drive_t *drive ); ide_startstop_t auide_dma_intr (ide_drive_t *drive); static void auide_dma_exec_cmd(ide_drive_t *drive, u8 command); static int auide_dma_setup(ide_drive_t *drive); @@ -183,8 +176,6 @@ int __init auide_probe(void); static void auide_ddma_rx_callback(int irq, void *param, struct pt_regs *regs); static int auide_dma_off_quietly(ide_drive_t *drive); - static int auide_dma_timeout(ide_drive_t *drive); - #endif /* end CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */ /******************************************************************************* @@ -294,3 +285,11 @@ int __init auide_probe(void); #define SBC_IDE_MDMA2_TPM (0x00<<6) #define SBC_IDE_MDMA2_TA (0x12<<0) +#define SBC_IDE_TIMING(mode) \ + SBC_IDE_##mode##_TWCS | \ + SBC_IDE_##mode##_TCSH | \ + SBC_IDE_##mode##_TCSOFF | \ + SBC_IDE_##mode##_TWP | \ + SBC_IDE_##mode##_TCSW | \ + SBC_IDE_##mode##_TPM | \ + SBC_IDE_##mode##_TA -- cgit v1.2.3 From 517bd1d5eac739a7f398058a9524386667fff032 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 15 Dec 2005 02:19:57 +0100 Subject: [PATCH] ide: cleanup ide.h Remove: * stale comment * unused HOST() macro * unused ata_{error,control}_t types * unused atapi_select_t type * ide_init_subdrivers() prototype Signed-off-by: Bartlomiej Zolnierkiewicz --- include/linux/ide.h | 122 ---------------------------------------------------- 1 file changed, 122 deletions(-) (limited to 'include') diff --git a/include/linux/ide.h b/include/linux/ide.h index a6b28dcf8f0..613534b7705 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -23,17 +23,6 @@ #include #include -/* - * This is the multiple IDE interface driver, as evolved from hd.c. - * It supports up to four IDE interfaces, on one or more IRQs (usually 14 & 15). - * There can be up to two drives per interface, as per the ATA-2 spec. - * - * Primary i/f: ide0: major=3; (hda) minor=0; (hdb) minor=64 - * Secondary i/f: ide1: major=22; (hdc or hd1a) minor=0; (hdd or hd1b) minor=64 - * Tertiary i/f: ide2: major=33; (hde) minor=0; (hdf) minor=64 - * Quaternary i/f: ide3: major=34; (hdg) minor=0; (hdh) minor=64 - */ - /****************************************************************************** * IDE driver configuration options (play with these as desired): * @@ -193,11 +182,6 @@ typedef unsigned char byte; /* used everywhere */ #define WAIT_CMD (10*HZ) /* 10sec - maximum wait for an IRQ to happen */ #define WAIT_MIN_SLEEP (2*HZ/100) /* 20msec - minimum sleep time */ -#define HOST(hwif,chipset) \ -{ \ - return ((hwif)->chipset == chipset) ? 1 : 0; \ -} - /* * Check for an interrupt and acknowledge the interrupt status */ @@ -390,45 +374,6 @@ typedef union { } b; } ata_nsector_t, ata_data_t, atapi_bcount_t, ata_index_t; -/* - * ATA-IDE Error Register - * - * mark : Bad address mark - * tzero : Couldn't find track 0 - * abrt : Aborted Command - * mcr : Media Change Request - * id : ID field not found - * mce : Media Change Event - * ecc : Uncorrectable ECC error - * bdd : dual meaing - */ -typedef union { - unsigned all :8; - struct { -#if defined(__LITTLE_ENDIAN_BITFIELD) - unsigned mark :1; - unsigned tzero :1; - unsigned abrt :1; - unsigned mcr :1; - unsigned id :1; - unsigned mce :1; - unsigned ecc :1; - unsigned bdd :1; -#elif defined(__BIG_ENDIAN_BITFIELD) - unsigned bdd :1; - unsigned ecc :1; - unsigned mce :1; - unsigned id :1; - unsigned mcr :1; - unsigned abrt :1; - unsigned tzero :1; - unsigned mark :1; -#else -#error "Please fix " -#endif - } b; -} ata_error_t; - /* * ATA-IDE Select Register, aka Device-Head * @@ -503,39 +448,6 @@ typedef union { } b; } ata_status_t, atapi_status_t; -/* - * ATA-IDE Control Register - * - * bit0 : Should be set to zero - * nIEN : device INTRQ to host - * SRST : host soft reset bit - * bit3 : ATA-2 thingy, Should be set to 1 - * reserved456 : Reserved - * HOB : 48-bit address ordering, High Ordered Bit - */ -typedef union { - unsigned all : 8; - struct { -#if defined(__LITTLE_ENDIAN_BITFIELD) - unsigned bit0 : 1; - unsigned nIEN : 1; - unsigned SRST : 1; - unsigned bit3 : 1; - unsigned reserved456 : 3; - unsigned HOB : 1; -#elif defined(__BIG_ENDIAN_BITFIELD) - unsigned HOB : 1; - unsigned reserved456 : 3; - unsigned bit3 : 1; - unsigned SRST : 1; - unsigned nIEN : 1; - unsigned bit0 : 1; -#else -#error "Please fix " -#endif - } b; -} ata_control_t; - /* * ATAPI Feature Register * @@ -617,39 +529,6 @@ typedef union { } b; } atapi_error_t; -/* - * ATAPI floppy Drive Select Register - * - * sam_lun : Logical unit number - * reserved3 : Reserved - * drv : The responding drive will be drive 0 (0) or drive 1 (1) - * one5 : Should be set to 1 - * reserved6 : Reserved - * one7 : Should be set to 1 - */ -typedef union { - unsigned all :8; - struct { -#if defined(__LITTLE_ENDIAN_BITFIELD) - unsigned sam_lun :3; - unsigned reserved3 :1; - unsigned drv :1; - unsigned one5 :1; - unsigned reserved6 :1; - unsigned one7 :1; -#elif defined(__BIG_ENDIAN_BITFIELD) - unsigned one7 :1; - unsigned reserved6 :1; - unsigned one5 :1; - unsigned drv :1; - unsigned reserved3 :1; - unsigned sam_lun :3; -#else -#error "Please fix " -#endif - } b; -} atapi_select_t; - /* * Status returned from various ide_ functions */ @@ -1298,7 +1177,6 @@ extern int ide_spin_wait_hwgroup(ide_drive_t *); extern void ide_timer_expiry(unsigned long); extern irqreturn_t ide_intr(int irq, void *dev_id, struct pt_regs *regs); extern void do_ide_request(request_queue_t *); -extern void ide_init_subdrivers(void); void ide_init_disk(struct gendisk *, ide_drive_t *); -- cgit v1.2.3 From 7b4df9ece9b4c4a754bd1f5603cdabff26b987e5 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 15 Dec 2005 02:20:15 +0100 Subject: [PATCH] ide: cleanup ide_driver_t Remove unused fields: ioctl, ata[pi]_prebuilder. Signed-off-by: Bartlomiej Zolnierkiewicz --- include/linux/ide.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/linux/ide.h b/include/linux/ide.h index 613534b7705..7b6a6a58e46 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -980,10 +980,7 @@ typedef struct ide_driver_s { int (*end_request)(ide_drive_t *, int, int); ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8); ide_startstop_t (*abort)(ide_drive_t *, struct request *rq); - int (*ioctl)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long); ide_proc_entry_t *proc; - void (*ata_prebuilder)(ide_drive_t *); - void (*atapi_prebuilder)(ide_drive_t *); struct device_driver gen_driver; } ide_driver_t; -- cgit v1.2.3 From f8ad23a401d41f90cb377035d206b41de0699a0b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 6 Dec 2005 05:44:18 -0500 Subject: [PATCH] fix iomem annotations in sparc32 pcic code Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- include/asm-sparc/pcic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm-sparc/pcic.h b/include/asm-sparc/pcic.h index 301ae8022dd..dedea14d87c 100644 --- a/include/asm-sparc/pcic.h +++ b/include/asm-sparc/pcic.h @@ -16,10 +16,10 @@ #include struct linux_pcic { - void * __iomem pcic_regs; + void __iomem *pcic_regs; unsigned long pcic_io; - void * __iomem pcic_config_space_addr; - void * __iomem pcic_config_space_data; + void __iomem *pcic_config_space_addr; + void __iomem *pcic_config_space_data; struct resource pcic_res_regs; struct resource pcic_res_io; struct resource pcic_res_cfg_addr; -- cgit v1.2.3 From a32972965e23471f0762a1136f80990ebf72406a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 6 Dec 2005 05:56:39 -0500 Subject: [PATCH] sun4c_memerr_reg __iomem annotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- include/asm-sparc/memreg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-sparc/memreg.h b/include/asm-sparc/memreg.h index c0498d3baf9..5fb95c828da 100644 --- a/include/asm-sparc/memreg.h +++ b/include/asm-sparc/memreg.h @@ -36,7 +36,7 @@ /* Memory parity error register with associated bit constants. */ #ifndef __ASSEMBLY__ -extern __volatile__ unsigned long *sun4c_memerr_reg; +extern __volatile__ unsigned long __iomem *sun4c_memerr_reg; #endif #define SUN4C_MPE_ERROR 0x80 /* Parity error detected. (ro) */ -- cgit v1.2.3 From f5899b5d4fa806403f547dc41312d017d94ec273 Mon Sep 17 00:00:00 2001 From: John Hawkes Date: Fri, 16 Dec 2005 10:00:24 -0800 Subject: [IA64] disable preemption in udelay() The udelay() inline for ia64 uses the ITC. If CONFIG_PREEMPT is enabled and the platform has unsynchronized ITCs and the calling task migrates to another CPU while doing the udelay loop, then the effective delay may be too short or very, very long. This patch disables preemption around 100 usec chunks of the overall desired udelay time. This minimizes preemption-holdoffs. udelay() is now too big to be inline, move it out of line and export it. Signed-off-by: John Hawkes Signed-off-by: Tony Luck --- include/asm-ia64/delay.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'include') diff --git a/include/asm-ia64/delay.h b/include/asm-ia64/delay.h index 57182d6f2b9..bba70207639 100644 --- a/include/asm-ia64/delay.h +++ b/include/asm-ia64/delay.h @@ -84,14 +84,6 @@ __delay (unsigned long loops) ia64_delay_loop (loops - 1); } -static __inline__ void -udelay (unsigned long usecs) -{ - unsigned long start = ia64_get_itc(); - unsigned long cycles = usecs*local_cpu_data->cyc_per_usec; - - while (ia64_get_itc() - start < cycles) - cpu_relax(); -} +extern void udelay (unsigned long usecs); #endif /* _ASM_IA64_DELAY_H */ -- cgit v1.2.3 From 4d7672b46244abffea1953e55688c0ea143dd617 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 16 Dec 2005 10:21:23 -0800 Subject: Make sure we copy pages inserted with "vm_insert_page()" on fork The logic that decides that a fork() might be able to avoid copying a VM area when it can be re-created by page faults didn't know about the new vm_insert_page() case. Also make some things a bit more anal wrt VM_PFNMAP. Pointed out by Hugh Dickins Signed-off-by: Linus Torvalds --- include/linux/mm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/mm.h b/include/linux/mm.h index e5677f45674..a06a84d347f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -163,6 +163,7 @@ extern unsigned int kobjsize(const void *objp); #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ +#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS -- cgit v1.2.3 From dc86e88c2bb8a7603ee175fbb6a9e92cf3293dd8 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Mon, 12 Dec 2005 09:34:32 -0800 Subject: [IA64] Add __read_mostly support for IA64 sparc64, i386 and x86_64 have support for a special data section dedicated to rarely updated data that is frequently read. The section was created to avoid false sharing of those rarely read data with frequently written kernel data. This patch creates such a data section for ia64 and will group rarely written data into this section. Signed-off-by: Christoph Lameter Signed-off-by: Tony Luck --- include/linux/cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/cache.h b/include/linux/cache.h index f6b5a46c5f8..0b7ecf3af78 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -13,7 +13,7 @@ #define SMP_CACHE_BYTES L1_CACHE_BYTES #endif -#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) +#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) #define __read_mostly __attribute__((__section__(".data.read_mostly"))) #else #define __read_mostly -- cgit v1.2.3 From 7c3dbbe982ac85837f1da150ea9539a9e9a12557 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 16 Dec 2005 22:35:23 +0000 Subject: [PATCH] ppc: ppc4xx_dma DMA_MODE_{READ,WRITE} fix DMA_MODE_{READ,WRITE} are declared in asm-powerpc/dma.h and their declarations there match the definitions. Old declarations in ppc4xx_dma.h are not right anymore (wrong type, to start with). Killed them, added include of asm/dma.h where needed. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- include/asm-ppc/ppc4xx_dma.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/asm-ppc/ppc4xx_dma.h b/include/asm-ppc/ppc4xx_dma.h index a415001165f..46a086fff81 100644 --- a/include/asm-ppc/ppc4xx_dma.h +++ b/include/asm-ppc/ppc4xx_dma.h @@ -33,9 +33,6 @@ #define MAX_PPC4xx_DMA_CHANNELS 4 -/* in arch/ppc/kernel/setup.c -- Cort */ -extern unsigned long DMA_MODE_WRITE, DMA_MODE_READ; - /* * Function return status codes * These values are used to indicate whether or not the function -- cgit v1.2.3 From 37b1cc3910f7976369fc0ed55068a686e92555e6 Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Fri, 16 Dec 2005 11:17:29 +0900 Subject: [PATCH] mtd onenand driver: check correct manufacturer This (and the three subsequent patches) is working well on OMAP H4 with 2.6.15-rc4 kernel and passes the LTP fs test. Signed-off-by: Linus Torvalds --- include/linux/mtd/onenand.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index f1fd4215686..53423d3b43b 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h @@ -140,7 +140,6 @@ struct onenand_chip { * OneNAND Flash Manufacturer ID Codes */ #define ONENAND_MFR_SAMSUNG 0xec -#define ONENAND_MFR_UNKNOWN 0x00 /** * struct nand_manufacturers - NAND Flash Manufacturer ID Structure -- cgit v1.2.3 From 532a37cf8d05dd1aa5631be836036204b0d2b4a1 Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Fri, 16 Dec 2005 11:17:29 +0900 Subject: [PATCH] mtd onenand driver: reduce stack usage Signed-off-by: Linus Torvalds --- include/linux/mtd/onenand.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 53423d3b43b..7419b5fab13 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h @@ -17,7 +17,6 @@ #include #define MAX_BUFFERRAM 2 -#define MAX_ONENAND_PAGESIZE (2048 + 64) /* Scan and identify a OneNAND device */ extern int onenand_scan(struct mtd_info *mtd, int max_chips); @@ -110,6 +109,7 @@ struct onenand_chip { spinlock_t chip_lock; wait_queue_head_t wq; onenand_state_t state; + unsigned char *page_buf; struct nand_oobinfo *autooob; @@ -134,7 +134,7 @@ struct onenand_chip { * Options bits */ #define ONENAND_CONT_LOCK (0x0001) - +#define ONENAND_PAGEBUF_ALLOC (0x1000) /* * OneNAND Flash Manufacturer ID Codes -- cgit v1.2.3 From 6b80ebedbee87c5b2213fc3635bf0bd7450bce30 Mon Sep 17 00:00:00 2001 From: Kristian Slavov Date: Mon, 19 Dec 2005 13:54:44 -0800 Subject: [RTNETLINK]: Fix RTNLGRP definitions in rtnetlink.h I reported a problem and gave hints to the solution, but nobody seemed to react. So I prepared a patch against 2.6.14.4. Tested on 2.6.14.4 with "ip monitor addr" and with the program attached, while adding and removing IPv6 address. Both programs didn't receive any messages. Tested 2.6.14.4 + this patch, and both programs received add and remove messages. Signed-off-by: Kristian Slavov Acked-by: Jamal Hadi salim ACKed-by: Patrick McHardy Signed-off-by: David S. Miller --- include/linux/rtnetlink.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index c231e9a08f0..d50482ba27f 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -866,6 +866,7 @@ enum rtnetlink_groups { #define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_ROUTE, #define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE + RTNLGRP_NOP1, RTNLGRP_IPV6_IFADDR, #define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_MROUTE, @@ -876,8 +877,11 @@ enum rtnetlink_groups { #define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO RTNLGRP_DECnet_IFADDR, #define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR + RTNLGRP_NOP2, RTNLGRP_DECnet_ROUTE, #define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE + RTNLGRP_NOP3, + RTNLGRP_NOP4, RTNLGRP_IPV6_PREFIX, #define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX __RTNLGRP_MAX -- cgit v1.2.3 From 399c180ac5f0cb66ef9479358e0b8b6bafcbeafe Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 19 Dec 2005 14:23:23 -0800 Subject: [IPSEC]: Perform SA switchover immediately. When we insert a new xfrm_state which potentially subsumes an existing one, make sure all cached bundles are flushed so that the new SA is used immediately. Signed-off-by: David S. Miller --- include/net/xfrm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 5beae1ccd57..1cdb8791213 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -890,6 +890,7 @@ struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto, extern void xfrm_policy_flush(void); extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); extern int xfrm_flush_bundles(void); +extern void xfrm_flush_all_bundles(void); extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family); extern void xfrm_init_pmtu(struct dst_entry *dst); -- cgit v1.2.3 From 29884df0d89c1df0dec3449405bc41569bb44800 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 13 Dec 2005 16:13:54 -0500 Subject: NFS: Fix another O_DIRECT race Ensure we call unmap_mapping_range() and sync dirty pages to disk before doing an NFS direct write. Signed-off-by: Trond Myklebust --- include/linux/nfs_fs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 12787a9b025..2516adeccec 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -291,6 +291,7 @@ static inline int nfs_verify_change_attribute(struct inode *inode, unsigned long /* * linux/fs/nfs/inode.c */ +extern int nfs_sync_mapping(struct address_space *mapping); extern void nfs_zap_caches(struct inode *); extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, struct nfs_fattr *); -- cgit v1.2.3 From fd30fc3256824f03c2ff9317269d66f72f7042ca Mon Sep 17 00:00:00 2001 From: Tom Zanussi Date: Tue, 20 Dec 2005 13:10:22 -0600 Subject: [PATCH] relayfs: remove warning printk() in relay_switch_subbuf() There's currently a diagnostic printk in relay_switch_subbuf() meant as a warning if you accidentally try to log an event larger than the sub-buffer size. The problem is if this happens while logging from somewhere it's not safe to be doing printks, such as in the scheduler, you can end up with a deadlock. This patch removes the warning from relay_switch_subbuf() and instead prints some diagnostic info when the channel is closed. Thanks to Mathieu Desnoyers for pointing out the problem and suggesting a fix. Signed-off-by: Tom Zanussi Signed-off-by: Linus Torvalds --- include/linux/relayfs_fs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/relayfs_fs.h b/include/linux/relayfs_fs.h index cfafc3e76bc..fb7e8073732 100644 --- a/include/linux/relayfs_fs.h +++ b/include/linux/relayfs_fs.h @@ -20,9 +20,9 @@ #include /* - * Tracks changes to rchan_buf struct + * Tracks changes to rchan/rchan_buf structs */ -#define RELAYFS_CHANNEL_VERSION 5 +#define RELAYFS_CHANNEL_VERSION 6 /* * Per-cpu relay channel buffer @@ -60,6 +60,7 @@ struct rchan struct rchan_callbacks *cb; /* client callbacks */ struct kref kref; /* channel refcount */ void *private_data; /* for user-defined data */ + size_t last_toobig; /* tried to log event > subbuf size */ struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ }; -- cgit v1.2.3