From 6724add1b5cfb020ba8f5532efe430d1ccd5fc30 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Wed, 15 Aug 2007 01:38:30 -0500 Subject: [SCSI] libiscsi: sync up iscsi and scsi eh's access to the connection The iscsi eh could be tearing down the session/connection while the scsi eh is still sending task management functions. If when we drop the session lock to grab the recv lock, the iscsi eh tears down the connection we will oops. Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- include/scsi/libiscsi.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 007d442..b4b3113 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h @@ -205,6 +205,13 @@ struct iscsi_queue { }; struct iscsi_session { + /* + * Syncs up the scsi eh thread with the iscsi eh thread when sending + * task management functions. This must be taken before the session + * and recv lock. + */ + struct mutex eh_mutex; + /* iSCSI session-wide sequencing */ uint32_t cmdsn; uint32_t exp_cmdsn; -- cgit v1.1 From 666cd174c451c172dd115b9d94f150efe627b609 Mon Sep 17 00:00:00 2001 From: Dirk Behme Date: Thu, 25 Jan 2007 16:26:46 -0800 Subject: ARM: OMAP: H3 workqueue fixes Signed-off-by: Dirk Behme Signed-off-by: Tony Lindgren --- include/asm-arm/arch-omap/irda.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-arm/arch-omap/irda.h b/include/asm-arm/arch-omap/irda.h index 345a649..96bb12f 100644 --- a/include/asm-arm/arch-omap/irda.h +++ b/include/asm-arm/arch-omap/irda.h @@ -31,6 +31,7 @@ struct omap_irda_config { unsigned long src_start; int tx_trigger; int rx_trigger; + int mode; }; #endif -- cgit v1.1 From 90833fdab89da02fc0276224167f0a42e5176f41 Mon Sep 17 00:00:00 2001 From: Jared Hulbert Date: Wed, 22 Aug 2007 17:38:25 +0100 Subject: [ARM] 4554/1: replace consistent_sync() with flush_ioremap_region() This fixes a regression from around 2.6.18, consistent_sync() will now BUG() under these circumstances. The use of consistent_sync() was a hack, replacing it's usage here with a new function, flush_ioremap_region(). Signed-off-by: Jared Hulbert Acked-by: Pavel Pisa Signed-off-by: Russell King --- include/asm-arm/cacheflush.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index d1294a4..6c1c968 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h @@ -426,6 +426,13 @@ static inline void flush_anon_page(struct vm_area_struct *vma, */ #define flush_icache_page(vma,page) do { } while (0) +static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt, + unsigned offset, size_t size) +{ + const void *start = (void __force *)virt + offset; + dmac_inv_range(start, start + size); +} + #define __cacheid_present(val) (val != read_cpuid(CPUID_ID)) #define __cacheid_type_v7(val) ((val & (7 << 29)) == (4 << 29)) -- cgit v1.1 From 7b1bc03e803f772bf71245eaba461651f32481b4 Mon Sep 17 00:00:00 2001 From: Karl Olsen Date: Mon, 20 Aug 2007 22:35:04 +0100 Subject: [ARM] 4553/1: ARM at91: define FIQ_START For ARM at91, the FIQ_START #define is required if you use a driver that enables FIQ support. Signed-off-by: Karl Olsen Acked-by: Andrew Victor Signed-off-by: Russell King --- include/asm-arm/arch-at91/irqs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/asm-arm/arch-at91/irqs.h b/include/asm-arm/arch-at91/irqs.h index 1127a3b..70b1216 100644 --- a/include/asm-arm/arch-at91/irqs.h +++ b/include/asm-arm/arch-at91/irqs.h @@ -42,4 +42,7 @@ */ #define NR_IRQS (NR_AIC_IRQS + (5 * 32)) +/* FIQ is AIC source 0. */ +#define FIQ_START AT91_ID_FIQ + #endif -- cgit v1.1 From 9d84588bdb72b6ec9d891fbdaa4305023e16ee3a Mon Sep 17 00:00:00 2001 From: Krzysztof Helt Date: Sat, 18 Aug 2007 22:23:57 +0100 Subject: [ARM] 4551/1: s3c24xx: fix wrong virtual address offsets This patch reduces 36-bit offset to 32-bit offsets. The 36-bit offsets makes virtual addresses wraps when added to 32-bit base. Signed-off-by: Krzysztof Helt Acked-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/plat-s3c/map.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/asm-arm/plat-s3c/map.h b/include/asm-arm/plat-s3c/map.h index 95a82b0..b84289d 100644 --- a/include/asm-arm/plat-s3c/map.h +++ b/include/asm-arm/plat-s3c/map.h @@ -30,11 +30,11 @@ #define S3C_ADDR(x) (S3C_ADDR_BASE + (x)) #endif -#define S3C_VA_IRQ S3C_ADDR(0x000000000) /* irq controller(s) */ -#define S3C_VA_SYS S3C_ADDR(0x001000000) /* system control */ -#define S3C_VA_MEM S3C_ADDR(0x002000000) /* system control */ -#define S3C_VA_TIMER S3C_ADDR(0x003000000) /* timer block */ -#define S3C_VA_WATCHDOG S3C_ADDR(0x004000000) /* watchdog */ -#define S3C_VA_UART S3C_ADDR(0x010000000) /* UART */ +#define S3C_VA_IRQ S3C_ADDR(0x00000000) /* irq controller(s) */ +#define S3C_VA_SYS S3C_ADDR(0x00100000) /* system control */ +#define S3C_VA_MEM S3C_ADDR(0x00200000) /* system control */ +#define S3C_VA_TIMER S3C_ADDR(0x00300000) /* timer block */ +#define S3C_VA_WATCHDOG S3C_ADDR(0x00400000) /* watchdog */ +#define S3C_VA_UART S3C_ADDR(0x01000000) /* UART */ #endif /* __ASM_PLAT_MAP_H */ -- cgit v1.1 From f6cf891c4d7128f9f91243fc0b9ce99e10fa1586 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 28 Aug 2007 12:53:24 +0200 Subject: sched: make the scheduler converge to the ideal latency de-HZ-ification of the granularity defaults unearthed a pre-existing property of CFS: while it correctly converges to the granularity goal, it does not prevent run-time fluctuations in the range of [-gran ... 0 ... +gran]. With the increase of the granularity due to the removal of HZ dependencies, this becomes visible in chew-max output (with 5 tasks running): out: 28 . 27. 32 | flu: 0 . 0 | ran: 9 . 13 | per: 37 . 40 out: 27 . 27. 32 | flu: 0 . 0 | ran: 17 . 13 | per: 44 . 40 out: 27 . 27. 32 | flu: 0 . 0 | ran: 9 . 13 | per: 36 . 40 out: 29 . 27. 32 | flu: 2 . 0 | ran: 17 . 13 | per: 46 . 40 out: 28 . 27. 32 | flu: 0 . 0 | ran: 9 . 13 | per: 37 . 40 out: 29 . 27. 32 | flu: 0 . 0 | ran: 18 . 13 | per: 47 . 40 out: 28 . 27. 32 | flu: 0 . 0 | ran: 9 . 13 | per: 37 . 40 average slice is the ideal 13 msecs and the period is picture-perfect 40 msecs. But the 'ran' field fluctuates around 13.33 msecs and there's no mechanism in CFS to keep that from happening: it's a perfectly valid solution that CFS finds. to fix this we add a granularity/preemption rule that knows about the "target latency", which makes tasks that run longer than the ideal latency run a bit less. The simplest approach is to simply decrease the preemption granularity when a task overruns its ideal latency. For this we have to track how much the task executed since its last preemption. ( this adds a new field to task_struct, but we can eliminate that overhead in 2.6.24 by putting all the scheduler timestamps into an anonymous union. ) with this change in place, chew-max output is fluctuation-less all around: out: 28 . 27. 39 | flu: 0 . 2 | ran: 13 . 13 | per: 41 . 40 out: 28 . 27. 39 | flu: 0 . 2 | ran: 13 . 13 | per: 41 . 40 out: 28 . 27. 39 | flu: 0 . 2 | ran: 13 . 13 | per: 41 . 40 out: 28 . 27. 39 | flu: 0 . 2 | ran: 13 . 13 | per: 41 . 40 out: 28 . 27. 39 | flu: 0 . 1 | ran: 13 . 13 | per: 41 . 40 out: 28 . 27. 39 | flu: 0 . 1 | ran: 13 . 13 | per: 41 . 40 this patch has no impact on any fastpath or on any globally observable scheduling property. (unless you have sharp enough eyes to see millisecond-level ruckles in glxgears smoothness :-) Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra Signed-off-by: Mike Galbraith --- include/linux/sched.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/sched.h b/include/linux/sched.h index bd6a032..f4e324e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -904,6 +904,7 @@ struct sched_entity { u64 exec_start; u64 sum_exec_runtime; + u64 prev_sum_exec_runtime; u64 wait_start_fair; u64 sleep_start_fair; -- cgit v1.1 From ea2dfb3733d53ac98b17756435d1f99e25490357 Mon Sep 17 00:00:00 2001 From: Vlad Yasevich Date: Fri, 13 Jul 2007 17:01:19 -0400 Subject: SCTP: properly clean up fragment and ordering queues during FWD-TSN. When we recieve a FWD-TSN (meaning the peer has abandoned the data), we need to clean up any partially received messages that may be hanging out on the re-assembly or re-ordering queues. This is a MUST requirement that was not properly done before. Signed-off-by: Vlad Yasevich --- include/net/sctp/ulpqueue.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h index 39ea3f4..cd33270 100644 --- a/include/net/sctp/ulpqueue.h +++ b/include/net/sctp/ulpqueue.h @@ -83,6 +83,7 @@ int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc); /* Skip over an SSN. */ void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn); +void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *, __u32); #endif /* __sctp_ulpqueue_h__ */ -- cgit v1.1 From 00f1c2df2a1c4903f4daa1333bafeb6dcbc9591d Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Tue, 21 Aug 2007 15:50:01 +0800 Subject: SCTP: Fix to encode PROTOCOL VIOLATION error cause correctly PROTOCOL VIOLATION error cause in ABORT is bad encode when make abort chunk. When SCTP encode ABORT chunk with PROTOCOL VIOLATION error cause, it just add the error messages to PROTOCOL VIOLATION error cause, the rest four bytes(struct sctp_paramhdr) is just add to the chunk, not change the length of error cause. This cause the ABORT chunk to be a bad format. The chunk is like this: ABORT chunk Chunk type: ABORT (6) Chunk flags: 0x00 Chunk length: 72 (*1) Protocol violation cause Cause code: Protocol violation (0x000d) Cause length: 62 (*2) Cause information: 5468652063756D756C61746976652074736E2061636B2062... Cause padding: 0000 [Needless] 00030010 Chunk Length(*1) = 72 but Cause length(*2) only 62, not include the extend 4 bytes. ((72 - sizeof(chunk_hdr)) = 68) != (62 +3) / 4 * 4 Signed-off-by: Wei Yongjun Signed-off-by: Vlad Yasevich --- include/net/sctp/sm.h | 2 +- include/net/sctp/structs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 73cb994..991c85b 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h @@ -214,7 +214,7 @@ struct sctp_chunk *sctp_make_shutdown_ack(const struct sctp_association *asoc, const struct sctp_chunk *); struct sctp_chunk *sctp_make_shutdown_complete(const struct sctp_association *, const struct sctp_chunk *); -void sctp_init_cause(struct sctp_chunk *, __be16 cause, const void *, size_t); +void sctp_init_cause(struct sctp_chunk *, __be16 cause, size_t); struct sctp_chunk *sctp_make_abort(const struct sctp_association *, const struct sctp_chunk *, const size_t hint); diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index ee4559b..c0d5848 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -726,6 +726,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len, struct iovec *data); void sctp_chunk_free(struct sctp_chunk *); void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); +void *sctp_addto_param(struct sctp_chunk *, int len, const void *data); struct sctp_chunk *sctp_chunkify(struct sk_buff *, const struct sctp_association *, struct sock *); -- cgit v1.1 From 05bb1fad1cde025a864a90cfeb98dcbefe78a44a Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 30 Aug 2007 22:10:28 -0700 Subject: [TCP]: Allow minimum RTO to be configurable via routing metrics. Cell phone networks do link layer retransmissions and other things that cause unnecessary timeout retransmits. So allow the minimum RTO to be inflated per-route to deal with this. Signed-off-by: David S. Miller --- include/linux/rtnetlink.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index c91476c..dff3192 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -351,6 +351,8 @@ enum #define RTAX_INITCWND RTAX_INITCWND RTAX_FEATURES, #define RTAX_FEATURES RTAX_FEATURES + RTAX_RTO_MIN, +#define RTAX_RTO_MIN RTAX_RTO_MIN __RTAX_MAX }; -- cgit v1.1 From 6e69d6068cc2aa545544189a1ee4d2e1a32ad591 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 28 Aug 2007 14:25:32 -0700 Subject: [SPARC64]: Fix type and constant sizes wrt. sun4u IMAP/ICLR handling. Sometimes we were using 32-bit values and the top bits were getting inadvertantly chopped off. This will matter for the forthcoming Fire controller MSI support. Signed-off-by: David S. Miller --- include/asm-sparc64/irq.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index e6c436e..c041e10 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h @@ -16,21 +16,21 @@ #include /* IMAP/ICLR register defines */ -#define IMAP_VALID 0x80000000 /* IRQ Enabled */ -#define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */ -#define IMAP_TID_JBUS 0x7c000000 /* JBUS TargetID */ +#define IMAP_VALID 0x80000000UL /* IRQ Enabled */ +#define IMAP_TID_UPA 0x7c000000UL /* UPA TargetID */ +#define IMAP_TID_JBUS 0x7c000000UL /* JBUS TargetID */ #define IMAP_TID_SHIFT 26 -#define IMAP_AID_SAFARI 0x7c000000 /* Safari AgentID */ +#define IMAP_AID_SAFARI 0x7c000000UL /* Safari AgentID */ #define IMAP_AID_SHIFT 26 -#define IMAP_NID_SAFARI 0x03e00000 /* Safari NodeID */ +#define IMAP_NID_SAFARI 0x03e00000UL /* Safari NodeID */ #define IMAP_NID_SHIFT 21 -#define IMAP_IGN 0x000007c0 /* IRQ Group Number */ -#define IMAP_INO 0x0000003f /* IRQ Number */ -#define IMAP_INR 0x000007ff /* Full interrupt number*/ +#define IMAP_IGN 0x000007c0UL /* IRQ Group Number */ +#define IMAP_INO 0x0000003fUL /* IRQ Number */ +#define IMAP_INR 0x000007ffUL /* Full interrupt number*/ -#define ICLR_IDLE 0x00000000 /* Idle state */ -#define ICLR_TRANSMIT 0x00000001 /* Transmit state */ -#define ICLR_PENDING 0x00000003 /* Pending state */ +#define ICLR_IDLE 0x00000000UL /* Idle state */ +#define ICLR_TRANSMIT 0x00000001UL /* Transmit state */ +#define ICLR_PENDING 0x00000003UL /* Pending state */ /* The largest number of unique interrupt sources we support. * If this needs to ever be larger than 255, you need to change -- cgit v1.1 From 5f92c329364c0bf2d3a356da5e8759fbe349f9d1 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 30 Aug 2007 22:27:28 -0700 Subject: [SPARC64]: Fix several bugs in MSI handling. 1) sun4{u,v}_build_msi() have improper return value handling. We should always return negative error codes, instead of using the magic value "0" which could in fact be a valid MSI number. 2) sun4{u,v}_build_msi() should return -ENOMEM instead of calling prom_prom() halt with kzalloc() of the interrupt data fails. 3) We 'remembered' the MSI number using a singleton in the struct device archdata area, this doesn't work for MSI-X which can cause multiple MSIs assosciated with one device. Delete that archdata member, and instead store the MSI number in the IRQ chip data area. Signed-off-by: David S. Miller --- include/asm-sparc64/device.h | 2 -- include/asm-sparc64/irq.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h index d5a4559..5111e87 100644 --- a/include/asm-sparc64/device.h +++ b/include/asm-sparc64/device.h @@ -16,8 +16,6 @@ struct dev_archdata { struct device_node *prom_node; struct of_device *op; - - unsigned int msi_num; }; #endif /* _ASM_SPARC64_DEVICE_H */ diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index c041e10..c00ad15 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h @@ -53,6 +53,9 @@ extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, extern void sun4v_destroy_msi(unsigned int virt_irq); extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); +extern void sparc64_set_msi(unsigned int virt_irq, u32 msi); +extern u32 sparc64_get_msi(unsigned int virt_irq); + extern void fixup_irqs(void); static __inline__ void set_softint(unsigned long bits) -- cgit v1.1 From 91a6d4ed333a47003f07636b3bd143521e0bbad1 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Mon, 27 Aug 2007 19:35:22 +0200 Subject: ata: add ATA_MWDMA* and ATA_SWDMA* defines Cc: Jeff Garzik Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jeff Garzik --- include/linux/ata.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/linux/ata.h b/include/linux/ata.h index 23a22df..c043c1c 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -73,6 +73,19 @@ enum { ATA_PIO5 = ATA_PIO4 | (1 << 5), ATA_PIO6 = ATA_PIO5 | (1 << 6), + ATA_SWDMA0 = (1 << 0), + ATA_SWDMA1 = ATA_SWDMA0 | (1 << 1), + ATA_SWDMA2 = ATA_SWDMA1 | (1 << 2), + + ATA_SWDMA2_ONLY = (1 << 2), + + ATA_MWDMA0 = (1 << 0), + ATA_MWDMA1 = ATA_MWDMA0 | (1 << 1), + ATA_MWDMA2 = ATA_MWDMA1 | (1 << 2), + + ATA_MWDMA12_ONLY = (1 << 1) | (1 << 2), + ATA_MWDMA2_ONLY = (1 << 2), + ATA_UDMA0 = (1 << 0), ATA_UDMA1 = ATA_UDMA0 | (1 << 1), ATA_UDMA2 = ATA_UDMA1 | (1 << 2), -- cgit v1.1 From aa137f9d29d30592774c727ec5cfcf9891e576fa Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Fri, 31 Aug 2007 00:48:45 -0700 Subject: SLUB: Force inlining for functions in slub_def.h Some compilers (especially older gcc releases) may skip inlining sometimes which will lead to link failures. Force the inlining of keyfunctions in slub_def.h to avoid these issues. Signed-off-by: Christoph Lameter Acked-by: Jan Dittmer Signed-off-by: Linus Torvalds --- include/linux/slub_def.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 124270d..7496207 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -78,7 +78,7 @@ extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]; * Sorry that the following has to be that ugly but some versions of GCC * have trouble with constant propagation and loops. */ -static inline int kmalloc_index(size_t size) +static __always_inline int kmalloc_index(size_t size) { if (!size) return 0; @@ -133,7 +133,7 @@ static inline int kmalloc_index(size_t size) * This ought to end up with a global pointer to the right cache * in kmalloc_caches. */ -static inline struct kmem_cache *kmalloc_slab(size_t size) +static __always_inline struct kmem_cache *kmalloc_slab(size_t size) { int index = kmalloc_index(size); @@ -166,7 +166,7 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) void *kmem_cache_alloc(struct kmem_cache *, gfp_t); void *__kmalloc(size_t size, gfp_t flags); -static inline void *kmalloc(size_t size, gfp_t flags) +static __always_inline void *kmalloc(size_t size, gfp_t flags) { if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { struct kmem_cache *s = kmalloc_slab(size); @@ -183,7 +183,7 @@ static inline void *kmalloc(size_t size, gfp_t flags) void *__kmalloc_node(size_t size, gfp_t flags, int node); void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node); -static inline void *kmalloc_node(size_t size, gfp_t flags, int node) +static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) { if (__builtin_constant_p(size) && !(flags & SLUB_DMA)) { struct kmem_cache *s = kmalloc_slab(size); -- cgit v1.1 From 16c55b038033d8f6f7601996dfae44399666d9ab Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Wed, 29 Aug 2007 11:58:33 +0900 Subject: libata: implement BROKEN_HPA horkage and apply it to affected drives Some drives choke on READ_NATIVE_MAX_ADDRESS[_EXT]. Implement ATA_HORKAGE_BROKEN_HPA and apply it to affected drives. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- 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 41978a5..a67bb90 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -303,6 +303,7 @@ enum { ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ + ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ }; enum hsm_task_states { -- cgit v1.1 From c7ec16da5adc1c1b341b2a83bde7add17dcf811a Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Thu, 30 Aug 2007 23:56:17 -0700 Subject: uml: fix linker script alignment bugs Fix a class of bugs in the UML linker scripts which caused section boundary variables to sometimes not line up with their sections. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-um/common.lds.S | 124 +++++++++++++++++++++++++++----------------- 1 file changed, 77 insertions(+), 47 deletions(-) (limited to 'include') diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S index e3f010b..cb02486 100644 --- a/include/asm-um/common.lds.S +++ b/include/asm-um/common.lds.S @@ -16,82 +16,112 @@ . = ALIGN(4096); .note : { *(.note.*) } - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; + __ex_table : { + __start___ex_table = .; + *(__ex_table) + __stop___ex_table = .; + } BUG_TABLE - __uml_setup_start = .; - .uml.setup.init : { *(.uml.setup.init) } - __uml_setup_end = .; + .uml.setup.init : { + __uml_setup_start = .; + *(.uml.setup.init) + __uml_setup_end = .; + } - __uml_help_start = .; - .uml.help.init : { *(.uml.help.init) } - __uml_help_end = .; + .uml.help.init : { + __uml_help_start = .; + *(.uml.help.init) + __uml_help_end = .; + } - __uml_postsetup_start = .; - .uml.postsetup.init : { *(.uml.postsetup.init) } - __uml_postsetup_end = .; + .uml.postsetup.init : { + __uml_postsetup_start = .; + *(.uml.postsetup.init) + __uml_postsetup_end = .; + } - __setup_start = .; - .init.setup : { *(.init.setup) } - __setup_end = .; + .init.setup : { + __setup_start = .; + *(.init.setup) + __setup_end = .; + } . = ALIGN(32); - __per_cpu_start = . ; - .data.percpu : { *(.data.percpu) } - __per_cpu_end = . ; + .data.percpu : { + __per_cpu_start = . ; + *(.data.percpu) + __per_cpu_end = . ; + } - __initcall_start = .; .initcall.init : { + __initcall_start = .; INITCALLS + __initcall_end = .; } - __initcall_end = .; - __con_initcall_start = .; - .con_initcall.init : { *(.con_initcall.init) } - __con_initcall_end = .; + .con_initcall.init : { + __con_initcall_start = .; + *(.con_initcall.init) + __con_initcall_end = .; + } - __uml_initcall_start = .; - .uml.initcall.init : { *(.uml.initcall.init) } - __uml_initcall_end = .; + .uml.initcall.init : { + __uml_initcall_start = .; + *(.uml.initcall.init) + __uml_initcall_end = .; + } __init_end = .; SECURITY_INIT - __exitcall_begin = .; - .exitcall : { *(.exitcall.exit) } - __exitcall_end = .; + .exitcall : { + __exitcall_begin = .; + *(.exitcall.exit) + __exitcall_end = .; + } - __uml_exitcall_begin = .; - .uml.exitcall : { *(.uml.exitcall.exit) } - __uml_exitcall_end = .; + .uml.exitcall : { + __uml_exitcall_begin = .; + *(.uml.exitcall.exit) + __uml_exitcall_end = .; + } . = ALIGN(4); - __alt_instructions = .; - .altinstructions : { *(.altinstructions) } - __alt_instructions_end = .; + .altinstructions : { + __alt_instructions = .; + *(.altinstructions) + __alt_instructions_end = .; + } .altinstr_replacement : { *(.altinstr_replacement) } /* .exit.text is discard at runtime, not link time, to deal with references from .altinstructions and .eh_frame */ .exit.text : { *(.exit.text) } .exit.data : { *(.exit.data) } - __preinit_array_start = .; - .preinit_array : { *(.preinit_array) } - __preinit_array_end = .; - __init_array_start = .; - .init_array : { *(.init_array) } - __init_array_end = .; - __fini_array_start = .; - .fini_array : { *(.fini_array) } - __fini_array_end = .; + .preinit_array : { + __preinit_array_start = .; + *(.preinit_array) + __preinit_array_end = .; + } + .init_array : { + __init_array_start = .; + *(.init_array) + __init_array_end = .; + } + .fini_array : { + __fini_array_start = .; + *(.fini_array) + __fini_array_end = .; + } . = ALIGN(4096); - __initramfs_start = .; - .init.ramfs : { *(.init.ramfs) } - __initramfs_end = .; + .init.ramfs : { + __initramfs_start = .; + *(.init.ramfs) + __initramfs_end = .; + } /* Sections to be discarded */ /DISCARD/ : { -- cgit v1.1 From d1254b12c93e1e586137a2ffef71fd33cf273f35 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Thu, 30 Aug 2007 23:56:20 -0700 Subject: uml: fix x86_64 core dump crash Stop UML crashing when trying to dump a process core on x86_64. This is the minimal fix to stop the crash - more things are broken here, and patches are forthcoming. The immediate thing to do is define ELF_CORE_COPY_REGS and ELF_CORE_COPY_FPREGS. Defining ELF_CORE_COPY_FPREGS allows dump_fpu to go away. It is defined in terms of save_fp_registers, so that needs to be added. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-um/elf-x86_64.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'include') diff --git a/include/asm-um/elf-x86_64.h b/include/asm-um/elf-x86_64.h index 8a8246d..bfe27aa 100644 --- a/include/asm-um/elf-x86_64.h +++ b/include/asm-um/elf-x86_64.h @@ -6,7 +6,9 @@ #ifndef __UM_ELF_X86_64_H #define __UM_ELF_X86_64_H +#include #include +#include "skas.h" /* x86-64 relocation types, taken from asm-x86_64/elf.h */ #define R_X86_64_NONE 0 /* No reloc */ @@ -64,6 +66,44 @@ typedef struct { } elf_fpregset_t; PT_REGS_R15(regs) = 0; \ } while (0) +#define ELF_CORE_COPY_REGS(pr_reg, regs) \ + (pr_reg)[0] = (regs)->regs.gp[0]; \ + (pr_reg)[1] = (regs)->regs.gp[1]; \ + (pr_reg)[2] = (regs)->regs.gp[2]; \ + (pr_reg)[3] = (regs)->regs.gp[3]; \ + (pr_reg)[4] = (regs)->regs.gp[4]; \ + (pr_reg)[5] = (regs)->regs.gp[5]; \ + (pr_reg)[6] = (regs)->regs.gp[6]; \ + (pr_reg)[7] = (regs)->regs.gp[7]; \ + (pr_reg)[8] = (regs)->regs.gp[8]; \ + (pr_reg)[9] = (regs)->regs.gp[9]; \ + (pr_reg)[10] = (regs)->regs.gp[10]; \ + (pr_reg)[11] = (regs)->regs.gp[11]; \ + (pr_reg)[12] = (regs)->regs.gp[12]; \ + (pr_reg)[13] = (regs)->regs.gp[13]; \ + (pr_reg)[14] = (regs)->regs.gp[14]; \ + (pr_reg)[15] = (regs)->regs.gp[15]; \ + (pr_reg)[16] = (regs)->regs.gp[16]; \ + (pr_reg)[17] = (regs)->regs.gp[17]; \ + (pr_reg)[18] = (regs)->regs.gp[18]; \ + (pr_reg)[19] = (regs)->regs.gp[19]; \ + (pr_reg)[20] = (regs)->regs.gp[20]; \ + (pr_reg)[21] = current->thread.arch.fs; \ + (pr_reg)[22] = 0; \ + (pr_reg)[23] = 0; \ + (pr_reg)[24] = 0; \ + (pr_reg)[25] = 0; \ + (pr_reg)[26] = 0; + +static inline int elf_core_copy_fpregs(struct task_struct *t, + elf_fpregset_t *fpu) +{ + int cpu = current_thread->cpu; + return save_fp_registers(userspace_pid[cpu], (unsigned long *) fpu); +} + +#define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu) + #ifdef TIF_IA32 /* XXX */ #error XXX, indeed clear_thread_flag(TIF_IA32); -- cgit v1.1 From f3de4be9d5f8551d7880a1f1f5231a30e0161b1f Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Thu, 30 Aug 2007 23:56:29 -0700 Subject: PM: Fix dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION Dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION introduced by commit 296699de6bdc717189a331ab6bbe90e05c94db06 "Introduce CONFIG_SUSPEND for suspend-to-Ram and standby" are incorrect, as they don't cover the facts that (1) not all architectures support suspend and (2) SMP hibernation is only possible on X86 and PPC64 (if CONFIG_PPC64_SWSUSP is set). Signed-off-by: Rafael J. Wysocki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/cpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 1d5ded0..0ad72c4 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -126,16 +126,16 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) static inline int cpu_is_offline(int cpu) { return 0; } #endif /* CONFIG_HOTPLUG_CPU */ -#ifdef CONFIG_SUSPEND_SMP +#ifdef CONFIG_PM_SLEEP_SMP extern int suspend_cpu_hotplug; extern int disable_nonboot_cpus(void); extern void enable_nonboot_cpus(void); -#else +#else /* !CONFIG_PM_SLEEP_SMP */ #define suspend_cpu_hotplug 0 static inline int disable_nonboot_cpus(void) { return 0; } static inline void enable_nonboot_cpus(void) {} -#endif +#endif /* !CONFIG_PM_SLEEP_SMP */ #endif /* _LINUX_CPU_H_ */ -- cgit v1.1 From 60693e5a9a2063b87d4dbe8029816c814b3fa84e Mon Sep 17 00:00:00 2001 From: Shane Huang Date: Thu, 30 Aug 2007 23:56:38 -0700 Subject: i2c-piix4: Fix SB700 PCI device ID We find that SB700 and SB800 use the same SMBus device ID as SB600, which is 0x4385, instead of the already submitted 0x4395. Besides removing the wrong SB700 device ID, add SB800 support to kernel, by renaming the PCI_DEVICE_ID_ATI_IXP600_SMBUS into PCI_DEVICE_ID_ATI_SBX00_SMBUS. Signed-off-by: Shane Huang Signed-off-by: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/pci_ids.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 06d23e1..17168f3 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -374,10 +374,9 @@ #define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 -#define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 +#define PCI_DEVICE_ID_ATI_SBX00_SMBUS 0x4385 #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 -#define PCI_DEVICE_ID_ATI_IXP700_SMBUS 0x4395 #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c #define PCI_VENDOR_ID_VLSI 0x1004 -- cgit v1.1 From dec4ad86c2fbea062e9ef9caa6d6e79f7c5e0b12 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 30 Aug 2007 23:56:40 -0700 Subject: hugepage: fix broken check for offset alignment in hugepage mappings For hugepage mappings, the file offset, like the address and size, needs to be aligned to the size of a hugepage. In commit 68589bc353037f233fe510ad9ff432338c95db66, the check for this was moved into prepare_hugepage_range() along with the address and size checks. But since BenH's rework of the get_unmapped_area() paths leading up to commit 4b1d89290b62bb2db476c94c82cf7442aab440c8, prepare_hugepage_range() is only called for MAP_FIXED mappings, not for other mappings. This means we're no longer ever checking for an aligned offset - I've confirmed that mmap() will (apparently) succeed with a misaligned offset on both powerpc and i386 at least. This patch restores the check, removing it from prepare_hugepage_range() and putting it back into hugetlbfs_file_mmap(). I'm putting it there, rather than in the get_unmapped_area() path so it only needs to go in one place, than separately in the half-dozen or so arch-specific implementations of hugetlb_get_unmapped_area(). Signed-off-by: David Gibson Cc: Adam Litke Cc: Andi Kleen Cc: "David S. Miller" Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/hugetlb.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index e6a71c8..3a19b03 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -66,11 +66,8 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, * If the arch doesn't supply something else, assume that hugepage * size aligned regions are ok without further preparation. */ -static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, - pgoff_t pgoff) +static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) { - if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) - return -EINVAL; if (len & ~HPAGE_MASK) return -EINVAL; if (addr & ~HPAGE_MASK) @@ -78,8 +75,7 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, return 0; } #else -int prepare_hugepage_range(unsigned long addr, unsigned long len, - pgoff_t pgoff); +int prepare_hugepage_range(unsigned long addr, unsigned long len); #endif #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE @@ -117,7 +113,7 @@ static inline unsigned long hugetlb_total_pages(void) #define hugetlb_report_meminfo(buf) 0 #define hugetlb_report_node_meminfo(n, buf) 0 #define follow_huge_pmd(mm, addr, pmd, write) NULL -#define prepare_hugepage_range(addr,len,pgoff) (-EINVAL) +#define prepare_hugepage_range(addr,len) (-EINVAL) #define pmd_huge(x) 0 #define is_hugepage_only_range(mm, addr, len) 0 #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) -- cgit v1.1 From 6e9de18120988388cdae5097c09e774416d58745 Mon Sep 17 00:00:00 2001 From: John Keller Date: Wed, 22 Aug 2007 19:32:06 -0500 Subject: [IA64] SN: Add support for CPU disable Add additional support for CPU disable on SN platforms. Correctly setup the smp_affinity mask for I/O error IRQs. Restrict the use of the feature to Altix 4000 and 450 systems running with a CPU disable capable PROM, and do not allow disabling of CPU 0. Signed-off-by: John Keller Signed-off-by: Tony Luck --- include/asm-ia64/sn/arch.h | 1 + include/asm-ia64/sn/intr.h | 1 + include/asm-ia64/sn/sn_feature_sets.h | 1 + 3 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h index 16adc93..7caa1f4 100644 --- a/include/asm-ia64/sn/arch.h +++ b/include/asm-ia64/sn/arch.h @@ -81,5 +81,6 @@ extern u8 sn_sharing_domain_size; extern u8 sn_region_size; extern void sn_flush_all_caches(long addr, long bytes); +extern bool sn_cpu_disable_allowed(int cpu); #endif /* _ASM_IA64_SN_ARCH_H */ diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h index 12b54dd..e0487aa 100644 --- a/include/asm-ia64/sn/intr.h +++ b/include/asm-ia64/sn/intr.h @@ -60,6 +60,7 @@ extern u64 sn_intr_alloc(nasid_t, int, int, nasid_t, int); extern void sn_intr_free(nasid_t, int, struct sn_irq_info *); extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int); +extern void sn_set_err_irq_affinity(unsigned int); extern struct list_head **sn_irq_lh; #define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector) diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h index bfdc362..8e83ac1 100644 --- a/include/asm-ia64/sn/sn_feature_sets.h +++ b/include/asm-ia64/sn/sn_feature_sets.h @@ -31,6 +31,7 @@ extern int sn_prom_feature_available(int id); #define PRF_PAL_CACHE_FLUSH_SAFE 0 #define PRF_DEVICE_FLUSH_LIST 1 #define PRF_HOTPLUG_SUPPORT 2 +#define PRF_CPU_DISABLE_SUPPORT 3 /* --------------------- OS Features -------------------------------*/ -- cgit v1.1 From 8b713c67bccef7cabb0ee915f47eb33d82636af9 Mon Sep 17 00:00:00 2001 From: Peter Chubb Date: Tue, 21 Aug 2007 13:51:45 +1000 Subject: [IA64] Enable early console for Ski simulator This patch cleans up the `enable early console for SKI' patch (471e7a44848f467c9b83adc3463d019d2fa8817f), and 1. potentially allows the gensparse_defconfig to work again. (there are other problems running a generic kernel on Ski) 2. fixes the `console registered twice' problem. 3. Cleans up the code by moving the `extern hpsim_cons' declaration to a new asm/hpsim.h file. Thanks to Jes for comments. Signed-off-by: Peter Chubb Signed-off-by: Tony Luck --- include/asm-ia64/hpsim.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 include/asm-ia64/hpsim.h (limited to 'include') diff --git a/include/asm-ia64/hpsim.h b/include/asm-ia64/hpsim.h new file mode 100644 index 0000000..d6be3fd --- /dev/null +++ b/include/asm-ia64/hpsim.h @@ -0,0 +1,10 @@ +#ifndef _ASMIA64_HPSIM_H +#define _ASMIA64_HPSIM_H + +#ifndef CONFIG_HP_SIMSERIAL_CONSOLE +static inline int simcons_register(void) { return 1; } +#else +int simcons_register(void); +#endif + +#endif -- cgit v1.1 From 7b3166dbc3df5b72f2ba4ea130f4461e318a3838 Mon Sep 17 00:00:00 2001 From: Peter Chubb Date: Tue, 21 Aug 2007 13:57:01 +1000 Subject: [IA64] Cleanup HPSIM code (was: Re: Enable early console for Ski simulator) After my last patch we have a new header file for HP simulator use. Here's code to use it for stuff that used to have `extern' statements inline in the code. Functionality should not change with this patch. Signed-off-by: Peter Chubb Signed-off-by: Tony Luck --- include/asm-ia64/hpsim.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/asm-ia64/hpsim.h b/include/asm-ia64/hpsim.h index d6be3fd..892ab19 100644 --- a/include/asm-ia64/hpsim.h +++ b/include/asm-ia64/hpsim.h @@ -7,4 +7,10 @@ static inline int simcons_register(void) { return 1; } int simcons_register(void); #endif +struct tty_driver; +extern struct tty_driver *hp_simserial_driver; + +void ia64_ssc_connect_irq(long intr, long irq); +void ia64_ctl_trace(long on); + #endif -- cgit v1.1 From 1b3b4a1a2deb7d3e5d66063bd76304d840c966b3 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 28 Aug 2007 10:29:36 -0400 Subject: NFS: Fix a write request leak in nfs_invalidate_page() Ryusuke Konishi says: The recent truncate_complete_page() clears the dirty flag from a page before calling a_ops->invalidatepage(), ^^^^^^ static void truncate_complete_page(struct address_space *mapping, struct page *page) { ... cancel_dirty_page(page, PAGE_CACHE_SIZE); <--- Inserted here at kernel 2.6.20 if (PagePrivate(page)) do_invalidatepage(page, 0); ---> will call a_ops->invalidatepage() ... } and this is disturbing nfs_wb_page_priority() from calling nfs_writepage_locked() that is expected to handle the pending request (=nfs_page) associated with the page. int nfs_wb_page_priority(struct inode *inode, struct page *page, int how) { ... if (clear_page_dirty_for_io(page)) { ret = nfs_writepage_locked(page, &wbc); if (ret < 0) goto out; } ... } Since truncate_complete_page() will get rid of the page after a_ops->invalidatepage() returns, the request (=nfs_page) associated with the page becomes a garbage in nfs_inode->nfs_page_tree. ------------------------ Fix this by ensuring that nfs_wb_page_priority() recognises that it may also need to clear out non-dirty pages that have an nfs_page associated with them. 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 157dcb0..7250eea 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -431,6 +431,7 @@ extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int); extern int nfs_wb_all(struct inode *inode); extern int nfs_wb_page(struct inode *inode, struct page* page); extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how); +extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) extern int nfs_commit_inode(struct inode *, int); extern struct nfs_write_data *nfs_commit_alloc(void); -- cgit v1.1 From e070fb743d9d13d9757e633d1bdd1f9c20b2d792 Mon Sep 17 00:00:00 2001 From: Hirokazu Takata Date: Fri, 17 Aug 2007 17:22:15 +0900 Subject: m32r: Define symbols to unify platform-dependent ICU checks On some m32r platforms, cascaded ICUs are used. This patch is required to simplify ei_handler and consolidate platform- dependent ICU check routines. platform ICU/INT1 ICU/INT0 ICU/INT2 -------------- -------- -------- -------- m32104ut o - - m32700ut o o o opsput o o o usrv o - - (others) - - - Signed-off-by: Hitoshi Yamamoto Signed-off-by: Hirokazu Takata --- include/asm-m32r/m32r.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') diff --git a/include/asm-m32r/m32r.h b/include/asm-m32r/m32r.h index decfc59..214b44b 100644 --- a/include/asm-m32r/m32r.h +++ b/include/asm-m32r/m32r.h @@ -22,12 +22,26 @@ #include #include #include +/* for ei_handler:linux/arch/m32r/kernel/entry.S */ +#define M32R_INT1ICU_ISTS PLD_ICUISTS +#define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE +#define M32R_INT0ICU_ISTS M32700UT_LAN_ICUISTS +#define M32R_INT0ICU_IRQ_BASE M32700UT_LAN_PLD_IRQ_BASE +#define M32R_INT2ICU_ISTS M32700UT_LCD_ICUISTS +#define M32R_INT2ICU_IRQ_BASE M32700UT_LCD_PLD_IRQ_BASE #endif /* CONFIG_PLAT_M32700UT */ #if defined(CONFIG_PLAT_OPSPUT) #include #include #include +/* for ei_handler:linux/arch/m32r/kernel/entry.S */ +#define M32R_INT1ICU_ISTS PLD_ICUISTS +#define M32R_INT1ICU_IRQ_BASE OPSPUT_PLD_IRQ_BASE +#define M32R_INT0ICU_ISTS OPSPUT_LAN_ICUISTS +#define M32R_INT0ICU_IRQ_BASE OPSPUT_LAN_PLD_IRQ_BASE +#define M32R_INT2ICU_ISTS OPSPUT_LCD_ICUISTS +#define M32R_INT2ICU_IRQ_BASE OPSPUT_LCD_PLD_IRQ_BASE #endif /* CONFIG_PLAT_OPSPUT */ #if defined(CONFIG_PLAT_MAPPI2) @@ -40,10 +54,16 @@ #if defined(CONFIG_PLAT_USRV) #include +/* for ei_handler:linux/arch/m32r/kernel/entry.S */ +#define M32R_INT1ICU_ISTS PLD_ICUISTS +#define M32R_INT1ICU_IRQ_BASE M32700UT_PLD_IRQ_BASE #endif #if defined(CONFIG_PLAT_M32104UT) #include +/* for ei_handler:linux/arch/m32r/kernel/entry.S */ +#define M32R_INT1ICU_ISTS PLD_ICUISTS +#define M32R_INT1ICU_IRQ_BASE M32104UT_PLD_IRQ_BASE #endif /* CONFIG_PLAT_M32104 */ /* -- cgit v1.1 From 9e3d3d07de1a9f2b83299653b75bfdbc0a8118f2 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 4 Sep 2007 23:16:04 -0400 Subject: Input: add more Braille keycodes Some braille keyboards have 10 dots, so extend the Input braille keys definitions. Signed-off-by: Samuel Thibault Signed-off-by: Dmitry Torokhov --- include/linux/input.h | 2 ++ include/linux/keyboard.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/input.h b/include/linux/input.h index e02c6a6..17df5a7 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -552,6 +552,8 @@ struct input_absinfo { #define KEY_BRL_DOT6 0x1f6 #define KEY_BRL_DOT7 0x1f7 #define KEY_BRL_DOT8 0x1f8 +#define KEY_BRL_DOT9 0x1f9 +#define KEY_BRL_DOT10 0x1fa /* We avoid low common keys in module aliases so they don't get huge. */ #define KEY_MIN_INTERESTING KEY_MUTE diff --git a/include/linux/keyboard.h b/include/linux/keyboard.h index de76843..7ddbc30 100644 --- a/include/linux/keyboard.h +++ b/include/linux/keyboard.h @@ -437,8 +437,10 @@ extern unsigned short plain_map[NR_KEYS]; #define K_BRL_DOT6 K(KT_BRL, 6) #define K_BRL_DOT7 K(KT_BRL, 7) #define K_BRL_DOT8 K(KT_BRL, 8) +#define K_BRL_DOT9 K(KT_BRL, 9) +#define K_BRL_DOT10 K(KT_BRL, 10) -#define NR_BRL 9 +#define NR_BRL 11 #define MAX_DIACR 256 #endif -- cgit v1.1 From 7071b2914a540b43dfcad17f6892a8c115799d50 Mon Sep 17 00:00:00 2001 From: Hirokazu Takata Date: Mon, 20 Aug 2007 20:53:50 +0900 Subject: m32r: Rename STI/CLI macros The names of STI and CLI macros were derived from i386 arch historically, but their name are incomprehensible. So, for easy to understand, rename these macros to ENABLE_INTERRUPTS and DISABLE_INTERRUPTS, respectively. Signed-off-by: Hirokazu Takata --- include/asm-m32r/assembler.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/asm-m32r/assembler.h b/include/asm-m32r/assembler.h index 47041d1..2635153 100644 --- a/include/asm-m32r/assembler.h +++ b/include/asm-m32r/assembler.h @@ -52,27 +52,27 @@ .endm #if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104)) -#define STI(reg) STI_M reg - .macro STI_M reg +#define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg + .macro ENABLE_INTERRUPTS reg setpsw #0x40 -> nop ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). .endm -#define CLI(reg) CLI_M reg - .macro CLI_M reg +#define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg + .macro DISABLE_INTERRUPTS reg clrpsw #0x40 -> nop ; WORKAROUND: "-> nop" is a workaround for the M32700(TS1). .endm #else /* CONFIG_CHIP_M32102 || CONFIG_CHIP_M32104 */ -#define STI(reg) STI_M reg - .macro STI_M reg +#define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg + .macro ENABLE_INTERRUPTS reg mvfc \reg, psw or3 \reg, \reg, #0x0040 mvtc \reg, psw .endm -#define CLI(reg) CLI_M reg - .macro CLI_M reg +#define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg + .macro DISABLE_INTERRUPTS reg mvfc \reg, psw and3 \reg, \reg, #0xffbf mvtc \reg, psw -- cgit v1.1 From b7f90a406ff72d6698b619210c205e3375dd099a Mon Sep 17 00:00:00 2001 From: Masato Noguchi Date: Fri, 7 Sep 2007 18:28:27 +1000 Subject: [POWERPC] cell/PS3: Fix a bug that causes the PS3 to hang on the SPU Class 0 interrupt. The Cell BE Architecture spec states that the SPU MFC Class 0 interrupt is edge-triggered. The current spu interrupt handler assumes this behavior and does not clear the interrupt status. The PS3 hypervisor visualizes all SPU interrupts as level, and on return from the interrupt handler the hypervisor will deliver a new virtual interrupt for any unmasked interrupts which for which the status has not been cleared. This fix clears the interrupt status in the interrupt handler. Signed-off-by: Masato Noguchi Signed-off-by: Geoff Levand Signed-off-by: Jeremy Kerr Acked-by: Arnd Bergmann Signed-off-by: Paul Mackerras --- include/asm-powerpc/spu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 8836c0f..5bde398 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h @@ -130,6 +130,7 @@ struct spu { u64 flags; u64 dar; u64 dsisr; + u64 class_0_pending; size_t ls_size; unsigned int slb_replace; struct mm_struct *mm; @@ -138,7 +139,6 @@ struct spu { unsigned long long timestamp; pid_t pid; pid_t tgid; - int class_0_pending; spinlock_t register_lock; void (* wbox_callback)(struct spu *spu); -- cgit v1.1 From 5a6e4e4207bc1b69dca540d759d9d176e5ce4ff1 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 10 Aug 2007 14:00:20 -0700 Subject: [MIPS] tty: add the new ioctls and definitions. Same as all the others, just put in the constants for the existing kernel code and termios2 structure Signed-off-by: Alan Cox Acked-by: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Ralf Baechle --- include/asm-mips/ioctls.h | 4 ++++ include/asm-mips/termbits.h | 7 +++++-- include/asm-mips/termios.h | 6 ++++-- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/asm-mips/ioctls.h b/include/asm-mips/ioctls.h index 92f6c36..5097cbf1 100644 --- a/include/asm-mips/ioctls.h +++ b/include/asm-mips/ioctls.h @@ -77,6 +77,10 @@ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x7416 /* Return the session ID of FD */ +#define TCGETS2 _IOR('T',0x2A, struct termios2) +#define TCSETS2 _IOW('T',0x2B, struct termios2) +#define TCSETSW2 _IOW('T',0x2C, struct termios2) +#define TCSETSF2 _IOW('T',0x2D, struct termios2) #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ diff --git a/include/asm-mips/termbits.h b/include/asm-mips/termbits.h index 5bfdc3b..c83c684 100644 --- a/include/asm-mips/termbits.h +++ b/include/asm-mips/termbits.h @@ -164,6 +164,7 @@ struct ktermios { #define HUPCL 0002000 /* Hang up on last close. */ #define CLOCAL 0004000 /* Ignore modem status lines. */ #define CBAUDEX 0010000 +#define BOTHER 0010000 #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 @@ -179,9 +180,11 @@ struct ktermios { #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 -#define CIBAUD 002003600000 /* input baud rate (not used) */ +#define CIBAUD 002003600000 /* input baud rate */ #define CMSPAR 010000000000 /* mark or space (stick) parity */ -#define CRTSCTS 020000000000 /* flow control */ +#define CRTSCTS 020000000000 /* flow control */ + +#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ /* c_lflag bits */ #define ISIG 0000001 /* Enable signals. */ diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h index 2ce07f4..a275661 100644 --- a/include/asm-mips/termios.h +++ b/include/asm-mips/termios.h @@ -122,8 +122,10 @@ struct termio { copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ }) -#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) -#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) +#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) +#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) +#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) +#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) #endif /* defined(__KERNEL__) */ -- cgit v1.1 From 7b0fdaa6a193e0b07d9f72e942f51ce25d9e0387 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 3 Sep 2007 16:22:26 +0200 Subject: [MIPS] Provide empty irq_enable_hazard definition for legacy and R1 cores. Following a strict interpretation the empty definition of irq_enable_hazard has always been a bug - but an intentional one because it didn't bite. This has now changed, for uniprocessor kernels mm/slab.c:do_drain() [...] on_each_cpu(do_drain, cachep, 1, 1); check_irq_on(); [...] may be compiled into a mtc0 c0_status; mfc0 c0_status sequence resulting in a back-to-back hazard. Signed-off-by: Ralf Baechle --- include/asm-mips/hazards.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index 918a489..6a5fa32 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.h @@ -172,6 +172,7 @@ ASMMACRO(tlb_probe_hazard, nop; nop; nop ) ASMMACRO(irq_enable_hazard, + _ssnop; _ssnop; _ssnop; ) ASMMACRO(irq_disable_hazard, nop; nop; nop -- cgit v1.1 From 43863074659b71345b0047c2cf2ff8d8f7a4b4a1 Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Thu, 6 Sep 2007 21:32:57 +0900 Subject: [MIPS] Ocelot: remove remaining bits Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- include/asm-mips/mach-ocelot/mach-gt64120.h | 30 ----------------------------- 1 file changed, 30 deletions(-) delete mode 100644 include/asm-mips/mach-ocelot/mach-gt64120.h (limited to 'include') diff --git a/include/asm-mips/mach-ocelot/mach-gt64120.h b/include/asm-mips/mach-ocelot/mach-gt64120.h deleted file mode 100644 index a62ecb5..0000000 --- a/include/asm-mips/mach-ocelot/mach-gt64120.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2001 MontaVista Software Inc. - * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net - * - * 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 of the License, or (at your - * option) any later version. - */ -#ifndef _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H -#define _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H - -/* - * PCI address allocation - */ -#define GT_PCI_MEM_BASE (0x22000000UL) -#define GT_PCI_MEM_SIZE GT_DEF_PCI0_MEM0_SIZE -#define GT_PCI_IO_BASE (0x20000000UL) -#define GT_PCI_IO_SIZE GT_DEF_PCI0_IO_SIZE - -extern unsigned long gt64120_base; - -#define GT64120_BASE (gt64120_base) - -/* - * GT timer irq - */ -#define GT_TIMER 6 - -#endif /* _ASM_GT64120_MOMENCO_OCELOT_GT64120_DEP_H */ -- cgit v1.1 From 980abe215b861891c39aba0936817c46f372143b Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Mon, 10 Sep 2007 11:55:46 -0400 Subject: UML: Fix ELF_CORE_COPY_REGS build botch The earlier crash dump fix on x86_64 depended on patches in -mm which are intended for post-2.6.23. Without those, it broke the build when it went into 2.6.23-rc5. This changes the field references in ELF_CORE_COPY_REGS back to those still used in mainline. Signed-off-by: Jeff Dike Signed-off-by: Linus Torvalds --- include/asm-um/elf-x86_64.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/asm-um/elf-x86_64.h b/include/asm-um/elf-x86_64.h index bfe27aa..857471c 100644 --- a/include/asm-um/elf-x86_64.h +++ b/include/asm-um/elf-x86_64.h @@ -67,27 +67,27 @@ typedef struct { } elf_fpregset_t; } while (0) #define ELF_CORE_COPY_REGS(pr_reg, regs) \ - (pr_reg)[0] = (regs)->regs.gp[0]; \ - (pr_reg)[1] = (regs)->regs.gp[1]; \ - (pr_reg)[2] = (regs)->regs.gp[2]; \ - (pr_reg)[3] = (regs)->regs.gp[3]; \ - (pr_reg)[4] = (regs)->regs.gp[4]; \ - (pr_reg)[5] = (regs)->regs.gp[5]; \ - (pr_reg)[6] = (regs)->regs.gp[6]; \ - (pr_reg)[7] = (regs)->regs.gp[7]; \ - (pr_reg)[8] = (regs)->regs.gp[8]; \ - (pr_reg)[9] = (regs)->regs.gp[9]; \ - (pr_reg)[10] = (regs)->regs.gp[10]; \ - (pr_reg)[11] = (regs)->regs.gp[11]; \ - (pr_reg)[12] = (regs)->regs.gp[12]; \ - (pr_reg)[13] = (regs)->regs.gp[13]; \ - (pr_reg)[14] = (regs)->regs.gp[14]; \ - (pr_reg)[15] = (regs)->regs.gp[15]; \ - (pr_reg)[16] = (regs)->regs.gp[16]; \ - (pr_reg)[17] = (regs)->regs.gp[17]; \ - (pr_reg)[18] = (regs)->regs.gp[18]; \ - (pr_reg)[19] = (regs)->regs.gp[19]; \ - (pr_reg)[20] = (regs)->regs.gp[20]; \ + (pr_reg)[0] = (regs)->regs.skas.regs[0]; \ + (pr_reg)[1] = (regs)->regs.skas.regs[1]; \ + (pr_reg)[2] = (regs)->regs.skas.regs[2]; \ + (pr_reg)[3] = (regs)->regs.skas.regs[3]; \ + (pr_reg)[4] = (regs)->regs.skas.regs[4]; \ + (pr_reg)[5] = (regs)->regs.skas.regs[5]; \ + (pr_reg)[6] = (regs)->regs.skas.regs[6]; \ + (pr_reg)[7] = (regs)->regs.skas.regs[7]; \ + (pr_reg)[8] = (regs)->regs.skas.regs[8]; \ + (pr_reg)[9] = (regs)->regs.skas.regs[9]; \ + (pr_reg)[10] = (regs)->regs.skas.regs[10]; \ + (pr_reg)[11] = (regs)->regs.skas.regs[11]; \ + (pr_reg)[12] = (regs)->regs.skas.regs[12]; \ + (pr_reg)[13] = (regs)->regs.skas.regs[13]; \ + (pr_reg)[14] = (regs)->regs.skas.regs[14]; \ + (pr_reg)[15] = (regs)->regs.skas.regs[15]; \ + (pr_reg)[16] = (regs)->regs.skas.regs[16]; \ + (pr_reg)[17] = (regs)->regs.skas.regs[17]; \ + (pr_reg)[18] = (regs)->regs.skas.regs[18]; \ + (pr_reg)[19] = (regs)->regs.skas.regs[19]; \ + (pr_reg)[20] = (regs)->regs.skas.regs[20]; \ (pr_reg)[21] = current->thread.arch.fs; \ (pr_reg)[22] = 0; \ (pr_reg)[23] = 0; \ -- cgit v1.1 From b311ec4ae82b1dc337689e966dcf9c5f6a53877e Mon Sep 17 00:00:00 2001 From: Joseph Chan Date: Mon, 10 Sep 2007 22:06:01 -0400 Subject: [libata, IDE] add new VIA bridge to VIA PATA drivers Signed-off-by: Joseph Chan Signed-off-by: Jeff Garzik --- 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 17168f3..d41747b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1343,6 +1343,7 @@ #define PCI_DEVICE_ID_VIA_8231_4 0x8235 #define PCI_DEVICE_ID_VIA_8365_1 0x8305 #define PCI_DEVICE_ID_VIA_CX700 0x8324 +#define PCI_DEVICE_ID_VIA_VX800 0x8353 #define PCI_DEVICE_ID_VIA_8371_1 0x8391 #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 #define PCI_DEVICE_ID_VIA_838X_1 0xB188 -- cgit v1.1 From 16fcec35e7d7c4faaa4709f6434a4a25b06d25e3 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Tue, 11 Sep 2007 11:28:26 +0200 Subject: [NETFILTER]: Fix/improve deadlock condition on module removal netfilter So I've had a deadlock reported to me. I've found that the sequence of events goes like this: 1) process A (modprobe) runs to remove ip_tables.ko 2) process B (iptables-restore) runs and calls setsockopt on a netfilter socket, increasing the ip_tables socket_ops use count 3) process A acquires a file lock on the file ip_tables.ko, calls remove_module in the kernel, which in turn executes the ip_tables module cleanup routine, which calls nf_unregister_sockopt 4) nf_unregister_sockopt, seeing that the use count is non-zero, puts the calling process into uninterruptible sleep, expecting the process using the socket option code to wake it up when it exits the kernel 4) the user of the socket option code (process B) in do_ipt_get_ctl, calls ipt_find_table_lock, which in this case calls request_module to load ip_tables_nat.ko 5) request_module forks a copy of modprobe (process C) to load the module and blocks until modprobe exits. 6) Process C. forked by request_module process the dependencies of ip_tables_nat.ko, of which ip_tables.ko is one. 7) Process C attempts to lock the request module and all its dependencies, it blocks when it attempts to lock ip_tables.ko (which was previously locked in step 3) Theres not really any great permanent solution to this that I can see, but I've developed a two part solution that corrects the problem Part 1) Modifies the nf_sockopt registration code so that, instead of using a use counter internal to the nf_sockopt_ops structure, we instead use a pointer to the registering modules owner to do module reference counting when nf_sockopt calls a modules set/get routine. This prevents the deadlock by preventing set 4 from happening. Part 2) Enhances the modprobe utilty so that by default it preforms non-blocking remove operations (the same way rmmod does), and add an option to explicity request blocking operation. So if you select blocking operation in modprobe you can still cause the above deadlock, but only if you explicity try (and since root can do any old stupid thing it would like.... :) ). Signed-off-by: Neil Horman Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- include/linux/netfilter.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 0eed0b7..1dd075e 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h @@ -88,9 +88,8 @@ struct nf_sockopt_ops int (*compat_get)(struct sock *sk, int optval, void __user *user, int *len); - /* Number of users inside set() or get(). */ - unsigned int use; - struct task_struct *cleanup_task; + /* Use the module struct to lock set/get code in place */ + struct module *owner; }; /* Each queued (to userspace) skbuff has one of these. */ -- cgit v1.1 From 5547bbeed37f7ab64942ffcce9293681101577ef Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 23 Aug 2007 10:37:53 -0700 Subject: PCI AER: fix warnings when PCIEAER=n Fix warnings when CONFIG_PCIEAER=n: drivers/pci/pcie/portdrv_pci.c:105: warning: statement with no effect drivers/pci/pcie/portdrv_pci.c:226: warning: statement with no effect drivers/scsi/arcmsr/arcmsr_hba.c:352: warning: statement with no effect Signed-off-by: Randy Dunlap Acked-by: Linas Vepstas Signed-off-by: Greg Kroah-Hartman --- include/linux/aer.h | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/linux/aer.h b/include/linux/aer.h index 5096562..bcf236d 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h @@ -15,11 +15,26 @@ extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev); #else -#define pci_enable_pcie_error_reporting(dev) (-EINVAL) -#define pci_find_aer_capability(dev) (0) -#define pci_disable_pcie_error_reporting(dev) (-EINVAL) -#define pci_cleanup_aer_uncorrect_error_status(dev) (-EINVAL) -#define pci_cleanup_aer_correct_error_status(dev) (-EINVAL) +static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev) +{ + return -EINVAL; +} +static inline int pci_find_aer_capability(struct pci_dev *dev) +{ + return 0; +} +static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev) +{ + return -EINVAL; +} +static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) +{ + return -EINVAL; +} +static inline int pci_cleanup_aer_correct_error_status(struct pci_dev *dev) +{ + return -EINVAL; +} #endif #endif //_AER_H_ -- cgit v1.1 From 99fa9844f0eed5582b5648f745204758b27db659 Mon Sep 17 00:00:00 2001 From: Jason Gaston Date: Thu, 30 Aug 2007 17:50:56 -0700 Subject: PCI: irq and pci_ids patch for Intel Tolapai This patch adds the Intel Tolapai LPC and SMBus Controller DID's. Signed-off-by: Jason Gaston Signed-off-by: Greg Kroah-Hartman --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d41747b..55f307f 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2293,6 +2293,8 @@ #define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599 #define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a #define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e +#define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 +#define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032 #define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 #define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 #define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 -- cgit v1.1 From 6c3c22f3cb2b7cd0a42a024b93db76b5c3133d37 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Tue, 11 Sep 2007 22:28:36 +0200 Subject: ide: add ide_dev_is_sata() helper (take 2) Make the SATA drive detection code from eighty_ninty_three() into inline ide_dev_is_sata() helper fixing it along the way to be more strict while checking word 80 for the reserved values... Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- include/linux/ide.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/linux/ide.h b/include/linux/ide.h index c792b4f..b9f66c1 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1378,6 +1378,19 @@ static inline int ide_dev_has_iordy(struct hd_driveid *id) return ((id->field_valid & 2) && (id->capability & 8)) ? 1 : 0; } +static inline int ide_dev_is_sata(struct hd_driveid *id) +{ + /* + * See if word 93 is 0 AND drive is at least ATA-5 compatible + * verifying that word 80 by casting it to a signed type -- + * this trick allows us to filter out the reserved values of + * 0x0000 and 0xffff along with the earlier ATA revisions... + */ + if (id->hw_config == 0 && (short)id->major_rev_num >= 0x0020) + return 1; + return 0; +} + u8 ide_dump_status(ide_drive_t *, const char *, u8); typedef struct ide_pio_timings_s { -- cgit v1.1 From df96efd73b81b8bc2d23b3d8b6025cce3d43db6c Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Tue, 11 Sep 2007 22:24:45 +0100 Subject: leds: Add missing include for leds.h This patch has added #include to include/linux/leds.h for rwlock_t. Signed-off-by: Yoichi Yuasa Signed-off-by: Richard Purdie --- include/linux/leds.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/leds.h b/include/linux/leds.h index 4211750..dc1178f 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -13,6 +13,7 @@ #define __LINUX_LEDS_H_INCLUDED #include +#include struct device; /* -- cgit v1.1 From 719b6f29fc2064eeeaa360ca06ce11aa207606fb Mon Sep 17 00:00:00 2001 From: Thiemo Seufer Date: Tue, 11 Sep 2007 15:23:33 -0700 Subject: BCM1480 serial build fix Restores serial functionality for the BCM1480. Signed-off-by: Thiemo Seufer Signed-off-by: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-mips/sibyte/bcm1480_regs.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/asm-mips/sibyte/bcm1480_regs.h b/include/asm-mips/sibyte/bcm1480_regs.h index 2738c13..c34d36b 100644 --- a/include/asm-mips/sibyte/bcm1480_regs.h +++ b/include/asm-mips/sibyte/bcm1480_regs.h @@ -227,10 +227,15 @@ (A_BCM1480_DUART(chan) + \ BCM1480_DUART_CHANREG_SPACING * 3 + (reg)) +#define DUART_IMRISR_SPACING 0x20 +#define DUART_INCHNG_SPACING 0x10 + #define R_BCM1480_DUART_IMRREG(chan) \ (R_DUART_IMR_A + ((chan) & 1) * DUART_IMRISR_SPACING) #define R_BCM1480_DUART_ISRREG(chan) \ (R_DUART_ISR_A + ((chan) & 1) * DUART_IMRISR_SPACING) +#define R_BCM1480_DUART_INCHREG(chan) \ + (R_DUART_IN_CHNG_A + ((chan) & 1) * DUART_INCHNG_SPACING) #define A_BCM1480_DUART_IMRREG(chan) \ (A_BCM1480_DUART_CTRLREG((chan), R_BCM1480_DUART_IMRREG(chan))) -- cgit v1.1 From a83308e60f63749dc1d08acb0d8fa9e2ec13c9a7 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Tue, 11 Sep 2007 15:23:47 -0700 Subject: PTR_ALIGN The AdvanSys driver wants to align some pointers, and the ALIGN macro doesn't work for pointers. Rather than try to make it work, add a new PTR_ALIGN macro which is typesafe. Signed-off-by: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/kernel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/kernel.h b/include/linux/kernel.h index f592df7..47160fe 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -34,6 +34,7 @@ extern const char linux_proc_banner[]; #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) +#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) -- cgit v1.1 From dd23aae4f5edf4e1dbd8f7f8013a754ba3253f48 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 11 Sep 2007 15:23:55 -0700 Subject: Fix select on /proc files without ->poll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Taneli Vähäkangas reported that commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba aka "Fix rmmod/read/write races in /proc entries" broke SBCL + SLIME combo. The old code in do_select() used DEFAULT_POLLMASK, if couldn't find ->poll handler. The new code makes ->poll always there and returns 0 by default, which is not correct. Return DEFAULT_POLLMASK instead. Steps to reproduce: install emacs, SBCL, SLIME emacs M-x slime in *inferior-lisp* buffer [watch it doing "Connecting to Swank on port X.."] Please, apply before 2.6.23. P.S.: why SBCL can't just read(2) /proc/cpuinfo is a mystery. Signed-off-by: Alexey Dobriyan Cc: T Taneli Vahakangas Cc: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/poll.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/poll.h b/include/linux/poll.h index 2769079..16d813b 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h @@ -21,6 +21,8 @@ #define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC) #define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry)) +#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) + struct poll_table_struct; /* -- cgit v1.1 From e845498e4ce4b0e704761e9462e5c29895ced34f Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 11 Sep 2007 15:23:56 -0700 Subject: m68k(nommu): add missing syscalls Signed-off-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-m68k/unistd.h | 12 +++++++++++- include/asm-m68knommu/unistd.h | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index fdbb60e..a30fe9c 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h @@ -313,10 +313,20 @@ #define __NR_tee 308 #define __NR_vmsplice 309 #define __NR_move_pages 310 +#define __NR_sched_setaffinity 311 +#define __NR_sched_getaffinity 312 +#define __NR_kexec_load 313 +#define __NR_getcpu 314 +#define __NR_epoll_pwait 315 +#define __NR_utimensat 316 +#define __NR_signalfd 317 +#define __NR_timerfd 318 +#define __NR_eventfd 319 +#define __NR_fallocate 320 #ifdef __KERNEL__ -#define NR_syscalls 311 +#define NR_syscalls 321 #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h index 82e0319..eb1b566 100644 --- a/include/asm-m68knommu/unistd.h +++ b/include/asm-m68knommu/unistd.h @@ -314,10 +314,20 @@ #define __NR_tee 308 #define __NR_vmsplice 309 #define __NR_move_pages 310 +#define __NR_sched_setaffinity 311 +#define __NR_sched_getaffinity 312 +#define __NR_kexec_load 313 +#define __NR_getcpu 314 +#define __NR_epoll_pwait 315 +#define __NR_utimensat 316 +#define __NR_signalfd 317 +#define __NR_timerfd 318 +#define __NR_eventfd 319 +#define __NR_fallocate 320 #ifdef __KERNEL__ -#define NR_syscalls 311 +#define NR_syscalls 321 #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR -- cgit v1.1 From b0052fcaefb829a29fdc6567274daf0b75329fc3 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 13 Sep 2007 01:16:31 +1000 Subject: Define termios_1 functions for powerpc, s390, avr32 and frv Commit f629307c857c030d5a3dd777fee37c8bb395e171 introduced uses of kernel_termios_to_user_termios_1 and user_termios_to_kernel_termios_1 on all architectures. However, powerpc, s390, avr32 and frv don't currently define those functions since their termios struct didn't need to be changed when the arbitrary baud rate stuff was added, and thus the kernel won't currently build on those architectures. This adds definitions of kernel_termios_to_user_termios_1 and user_termios_to_kernel_termios_1 to include/asm-generic/termios.h which are identical to kernel_termios_to_user_termios and user_termios_to_kernel_termios respectively. The definitions are the same because the "old" termios and "new" termios are in fact the same on these architectures (which are the same ones that use asm-generic/termios.h). Signed-off-by: Paul Mackerras Cc: Andrew Morton Cc: Alan Cox Cc: David Miller Signed-off-by: Linus Torvalds --- include/asm-generic/termios.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asm-generic/termios.h b/include/asm-generic/termios.h index 3769e6b..33dca30 100644 --- a/include/asm-generic/termios.h +++ b/include/asm-generic/termios.h @@ -63,6 +63,8 @@ static inline int kernel_termios_to_user_termio(struct termio __user *termio, #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) +#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) +#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) #endif /* __ARCH_TERMIO_GETPUT */ -- cgit v1.1