From fa43cd8b100e9c6182f872d0fc4bb3964e100808 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 13 Nov 2007 00:31:33 +0800 Subject: Blackfin arch: add a compatible DOUBLE_FAULT define to enable resets on double faults in either core Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/mach-bf561/defBF561.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/mach-bf561/defBF561.h b/include/asm-blackfin/mach-bf561/defBF561.h index 7945e8a3a84..66f19960844 100644 --- a/include/asm-blackfin/mach-bf561/defBF561.h +++ b/include/asm-blackfin/mach-bf561/defBF561.h @@ -55,6 +55,7 @@ /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ #define SWRST SICA_SWRST #define SYSCR SICA_SYSCR +#define DOUBLE_FAULT (DOUBLE_FAULT_B|DOUBLE_FAULT_A) #define RESET_DOUBLE (SWRST_DBL_FAULT_B|SWRST_DBL_FAULT_A) #define RESET_WDOG (SWRST_WDT_B|SWRST_WDT_A) #define RESET_SOFTWARE (SWRST_OCCURRED) @@ -877,12 +878,14 @@ #define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */ /* SWRST Mask */ -#define SYSTEM_RESET 0x00000007 /* Initiates a system software reset */ -#define SWRST_DBL_FAULT_B 0x00000800 /* SWRST Core B Double Fault */ -#define SWRST_DBL_FAULT_A 0x00001000 /* SWRST Core A Double Fault */ -#define SWRST_WDT_B 0x00002000 /* SWRST Watchdog B */ -#define SWRST_WDT_A 0x00004000 /* SWRST Watchdog A */ -#define SWRST_OCCURRED 0x00008000 /* SWRST Status */ +#define SYSTEM_RESET 0x0007 /* Initiates a system software reset */ +#define DOUBLE_FAULT_A 0x0008 /* Core A Double Fault Causes Reset */ +#define DOUBLE_FAULT_B 0x0010 /* Core B Double Fault Causes Reset */ +#define SWRST_DBL_FAULT_B 0x0800 /* SWRST Core B Double Fault */ +#define SWRST_DBL_FAULT_A 0x1000 /* SWRST Core A Double Fault */ +#define SWRST_WDT_B 0x2000 /* SWRST Watchdog B */ +#define SWRST_WDT_A 0x4000 /* SWRST Watchdog A */ +#define SWRST_OCCURRED 0x8000 /* SWRST Status */ /* ************* SYSTEM INTERRUPT CONTROLLER MASKS ***************** */ -- cgit v1.2.3 From 529a73fbaeee2f3bd932be8b54665994133be6ae Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 23 Nov 2007 14:28:44 +0800 Subject: Blackfin arch: punt CONFIG_BFIN -- we already have CONFIG_BLACKFIN Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/page_offset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-blackfin/page_offset.h b/include/asm-blackfin/page_offset.h index 3b671d5fd70..cbaff24b4b2 100644 --- a/include/asm-blackfin/page_offset.h +++ b/include/asm-blackfin/page_offset.h @@ -1,6 +1,6 @@ /* This handles the memory map.. */ -#ifdef CONFIG_BFIN +#ifdef CONFIG_BLACKFIN #define PAGE_OFFSET_RAW 0x00000000 #endif -- cgit v1.2.3 From a055b2b4de214d7c3c5382ba7e7c65d1476826b3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 15 Nov 2007 21:12:32 +0800 Subject: Blackfin arch: remove useless CONFIG_IRQCHIP_DEMUX_GPIO since we have this always turned on now and dont want it off (and hasnt been an option in a while) Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/mach-bf527/irq.h | 4 ---- include/asm-blackfin/mach-bf533/irq.h | 4 ---- include/asm-blackfin/mach-bf537/irq.h | 4 ---- include/asm-blackfin/mach-bf548/irq.h | 4 ---- include/asm-blackfin/mach-bf561/irq.h | 4 ---- 5 files changed, 20 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/mach-bf527/irq.h b/include/asm-blackfin/mach-bf527/irq.h index 304f5bcfebe..4e2b3f2020e 100644 --- a/include/asm-blackfin/mach-bf527/irq.h +++ b/include/asm-blackfin/mach-bf527/irq.h @@ -176,11 +176,7 @@ #define GPIO_IRQ_BASE IRQ_PF0 -#ifdef CONFIG_IRQCHIP_DEMUX_GPIO #define NR_IRQS (IRQ_PH15+1) -#else -#define NR_IRQS (SYS_IRQS+1) -#endif #define IVG7 7 #define IVG8 8 diff --git a/include/asm-blackfin/mach-bf533/irq.h b/include/asm-blackfin/mach-bf533/irq.h index 452fb825d89..832e6f6122d 100644 --- a/include/asm-blackfin/mach-bf533/irq.h +++ b/include/asm-blackfin/mach-bf533/irq.h @@ -130,11 +130,7 @@ Core Emulation ** #define GPIO_IRQ_BASE IRQ_PF0 -#ifdef CONFIG_IRQCHIP_DEMUX_GPIO #define NR_IRQS (IRQ_PF15+1) -#else -#define NR_IRQS SYS_IRQS -#endif #define IVG7 7 #define IVG8 8 diff --git a/include/asm-blackfin/mach-bf537/irq.h b/include/asm-blackfin/mach-bf537/irq.h index 36c44bc1a91..be6f2ff77f3 100644 --- a/include/asm-blackfin/mach-bf537/irq.h +++ b/include/asm-blackfin/mach-bf537/irq.h @@ -162,11 +162,7 @@ Core Emulation ** #define GPIO_IRQ_BASE IRQ_PF0 -#ifdef CONFIG_IRQCHIP_DEMUX_GPIO #define NR_IRQS (IRQ_PH15+1) -#else -#define NR_IRQS (IRQ_UART1_ERROR+1) -#endif #define IVG7 7 #define IVG8 8 diff --git a/include/asm-blackfin/mach-bf548/irq.h b/include/asm-blackfin/mach-bf548/irq.h index 3b08cf9bd6f..9fb7bc5399a 100644 --- a/include/asm-blackfin/mach-bf548/irq.h +++ b/include/asm-blackfin/mach-bf548/irq.h @@ -338,11 +338,7 @@ Events (highest priority) EMU 0 #define GPIO_IRQ_BASE IRQ_PA0 -#ifdef CONFIG_IRQCHIP_DEMUX_GPIO #define NR_IRQS (IRQ_PJ15+1) -#else -#define NR_IRQS (SYS_IRQS+1) -#endif /* For compatibility reasons with existing code */ diff --git a/include/asm-blackfin/mach-bf561/irq.h b/include/asm-blackfin/mach-bf561/irq.h index 12789927db3..83f0383957d 100644 --- a/include/asm-blackfin/mach-bf561/irq.h +++ b/include/asm-blackfin/mach-bf561/irq.h @@ -291,11 +291,7 @@ #define GPIO_IRQ_BASE IRQ_PF0 -#ifdef CONFIG_IRQCHIP_DEMUX_GPIO #define NR_IRQS (IRQ_PF47 + 1) -#else -#define NR_IRQS SYS_IRQS -#endif #define IVG7 7 #define IVG8 8 -- cgit v1.2.3 From b33d51877726b066699b9ee40b5f512c77bdca38 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 15 Nov 2007 21:15:47 +0800 Subject: Blackfin arch: fix double fault definition for BF561 core A and core B VDSP has double fault on core a/b inverted for BF561 -- bit 11 is core a while bit 12 is core b Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/mach-bf561/defBF561.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/mach-bf561/defBF561.h b/include/asm-blackfin/mach-bf561/defBF561.h index 66f19960844..c3c0eb13c81 100644 --- a/include/asm-blackfin/mach-bf561/defBF561.h +++ b/include/asm-blackfin/mach-bf561/defBF561.h @@ -881,8 +881,8 @@ #define SYSTEM_RESET 0x0007 /* Initiates a system software reset */ #define DOUBLE_FAULT_A 0x0008 /* Core A Double Fault Causes Reset */ #define DOUBLE_FAULT_B 0x0010 /* Core B Double Fault Causes Reset */ -#define SWRST_DBL_FAULT_B 0x0800 /* SWRST Core B Double Fault */ -#define SWRST_DBL_FAULT_A 0x1000 /* SWRST Core A Double Fault */ +#define SWRST_DBL_FAULT_A 0x0800 /* SWRST Core A Double Fault */ +#define SWRST_DBL_FAULT_B 0x1000 /* SWRST Core B Double Fault */ #define SWRST_WDT_B 0x2000 /* SWRST Watchdog B */ #define SWRST_WDT_A 0x4000 /* SWRST Watchdog A */ #define SWRST_OCCURRED 0x8000 /* SWRST Status */ -- cgit v1.2.3 From 05c484355fa6b22af5c1c96db154f108f8b5c625 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Sun, 18 Nov 2007 00:41:56 +0800 Subject: Blackfin arch: remove dump_thread() The only user is the a.out support. It was therefore removed prior to the blackfin merge from all architectures not supporting a.out. Currently, Blackfin doesn't suppport a.out. Signed-off-by: Adrian Bunk Signed-off-by: Bryan Wu --- include/asm-blackfin/bfin-global.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 0212e180b90..cd924bb6f2e 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h @@ -50,7 +50,6 @@ extern unsigned long get_sclk(void); extern unsigned long sclk_to_usecs(unsigned long sclk); extern unsigned long usecs_to_sclk(unsigned long usecs); -extern void dump_thread(struct pt_regs *regs, struct user *dump); extern void dump_bfin_regs(struct pt_regs *fp, void *retaddr); extern void dump_bfin_trace_buffer(void); -- cgit v1.2.3 From 5c91fb902d4e6f6006faf45edd3f25932cb7d58c Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Sat, 17 Nov 2007 23:46:58 +0800 Subject: Blackfin arch: Add assembly function insl_16 /* * CPUs often take a performance hit when accessing unaligned memory * locations. The actual performance hit varies, it can be small if the * hardware handles it or large if we have to take an exception and fix * it * in software. * * Since an ethernet header is 14 bytes network drivers often end up * with * the IP header at an unaligned offset. The IP header can be aligned by * shifting the start of the packet by 2 bytes. Drivers should do this * with: * * skb_reserve(NET_IP_ALIGN); * * The downside to this alignment of the IP header is that the DMA is * now * unaligned. On some architectures the cost of an unaligned DMA is high * and this cost outweighs the gains made by aligning the IP header. * * Since this trade off varies between architectures, we allow * NET_IP_ALIGN * to be overridden. */ This new function insl_16 allows to read form 32-bit IO and writes to 16-bit aligned memory. This is useful in above described scenario - In particular with the AXIS AX88180 Gigabit Ethernet MAC. Once the device is in 32-bit mode, reads from the RX FIFO always decrements 4bytes. While on the other side the destination address in SDRAM is always 16-bit aligned. If we use skb_reserve(0) the receive buffer is 32-bit aligned but later we hit a unaligned exception in the IP code. Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu --- include/asm-blackfin/io.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index d1d2e6be3b5..1601d62f39a 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h @@ -122,6 +122,7 @@ extern void outsl(unsigned long port, const void *addr, unsigned long count); extern void insb(unsigned long port, void *addr, unsigned long count); extern void insw(unsigned long port, void *addr, unsigned long count); extern void insl(unsigned long port, void *addr, unsigned long count); +extern void insl_16(unsigned long port, void *addr, unsigned long count); extern void dma_outsb(unsigned long port, const void *addr, unsigned short count); extern void dma_outsw(unsigned long port, const void *addr, unsigned short count); -- cgit v1.2.3 From a961d659637b7d77c916597017e2e3730859c333 Mon Sep 17 00:00:00 2001 From: Jie Zhang Date: Sun, 18 Nov 2007 00:00:10 +0800 Subject: Blackfin arch: More explicitly describe what the instructions do in inline assembly. Signed-off-by: Jie Zhang Signed-off-by: Bryan Wu --- include/asm-blackfin/mach-common/def_LPBlackfin.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/mach-common/def_LPBlackfin.h b/include/asm-blackfin/mach-common/def_LPBlackfin.h index c1d8c4a78fc..e8967f6124f 100644 --- a/include/asm-blackfin/mach-common/def_LPBlackfin.h +++ b/include/asm-blackfin/mach-common/def_LPBlackfin.h @@ -46,7 +46,7 @@ #endif #define bfin_read8(addr) ({ \ - uint8_t __v; \ + uint32_t __v; \ __asm__ __volatile__( \ NOP_PAD_ANOMALY_05000198 \ "%0 = b[%1] (z);" \ @@ -56,7 +56,7 @@ __v; }) #define bfin_read16(addr) ({ \ - uint16_t __v; \ + uint32_t __v; \ __asm__ __volatile__( \ NOP_PAD_ANOMALY_05000198 \ "%0 = w[%1] (z);" \ @@ -80,7 +80,7 @@ NOP_PAD_ANOMALY_05000198 \ "b[%0] = %1;" \ : \ - : "a" (addr), "d" (val) \ + : "a" (addr), "d" ((uint8_t)(val)) \ : "memory" \ ) @@ -89,7 +89,7 @@ NOP_PAD_ANOMALY_05000198 \ "w[%0] = %1;" \ : \ - : "a" (addr), "d" (val) \ + : "a" (addr), "d" ((uint16_t)(val)) \ : "memory" \ ) -- cgit v1.2.3 From 21df56c6e2372e09c916111efb6c14c372a5ab2e Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sun, 18 Nov 2007 18:48:08 -0800 Subject: [TCP]: Fix TCP header misalignment Indeed my previous change to alloc_pskb has made it possible for the TCP header to be misaligned iff the MTU is not a multiple of 4 (and less than a page). So I suspect the optimised IPsec MTU calculation is giving you just such an MTU :) This patch fixes it by changing alloc_pskb to make sure that the size is at least 32-bit aligned. This does not cause the problem fixed by the previous patch because max_header is always 32-bit aligned which means that in the SG/NOTSO case this will be a no-op. I thought about putting this in the callers but all the current callers are from TCP. If and when we get a non-TCP caller we can always create a TCP wrapper for this function and move the alignment over there. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- include/net/sock.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/net/sock.h b/include/net/sock.h index 567e468d749..67e35c7e230 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1236,6 +1236,9 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, { struct sk_buff *skb; + /* The TCP header must be at least 32-bit aligned. */ + size = ALIGN(size, 4); + skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp); if (skb) { skb->truesize += mem; -- cgit v1.2.3 From 21bef6dd2b419f28c8096a8e30ad86dcbff44c02 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 15 Nov 2007 10:35:45 +0900 Subject: libata: remove unused functions This patch removes the following obsolete functions: - libata-core.c: __sata_phy_reset() - libata-core.c: sata_phy_reset() - libata-eh.c: ata_qc_timeout() - libata-eh.c: ata_eng_timeout() Signed-off-by: Adrian Bunk Signed-off-by: Tejun Heo --- include/linux/libata.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/linux/libata.h b/include/linux/libata.h index 56a5673aeba..3f9a6a140a9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -771,8 +771,6 @@ static inline int ata_port_is_dummy(struct ata_port *ap) extern void sata_print_link_status(struct ata_link *link); extern void ata_port_probe(struct ata_port *); -extern void __sata_phy_reset(struct ata_port *ap); -extern void sata_phy_reset(struct ata_port *ap); extern void ata_bus_reset(struct ata_port *ap); extern int sata_set_spd(struct ata_link *link); extern int sata_link_debounce(struct ata_link *link, @@ -994,8 +992,6 @@ extern void sata_pmp_do_eh(struct ata_port *ap, /* * EH */ -extern void ata_eng_timeout(struct ata_port *ap); - extern void ata_port_schedule_eh(struct ata_port *ap); extern int ata_link_abort(struct ata_link *link); extern int ata_port_abort(struct ata_port *ap); -- cgit v1.2.3 From 2d3b8eea7f2fbafd5d779cc92f7aedbd1ef575e9 Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Thu, 15 Nov 2007 10:35:46 +0900 Subject: libata: workaround DRQ=1 ERR=1 for ATAPI tape drives After an error condition, some ATAPI tape drives set DRQ=1 together with ERR=1 when asking the host to transfer the CDB of the next packet command (i.e. request sense). This patch, a revised version of Alan/Mark's previous patch, adds ATA_HORKAGE_STUCK_ERR to workaround the problem by ignoring the ERR bit and proceed sending the CDB. Signed-off-by: Albert Lee Cc: Alan Cox Cc: Mark Lord Signed-off-by: Tejun Heo --- 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 3f9a6a140a9..ef52a07c43d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -340,6 +340,7 @@ enum { ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ + ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ /* DMA mask for user DMA control: User visible values; DO NOT renumber */ -- cgit v1.2.3 From 0349337467dc6039dcfb225074944ae944e7b34e Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Sun, 11 Nov 2007 13:17:44 +0900 Subject: sh: Fix copy_{to,from}_user_page() with cache disabled. Signed-off-by: Heiko Schocher Signed-off-by: Paul Mundt --- include/asm-sh/cacheflush.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h index b91246153b7..9d528ada3c1 100644 --- a/include/asm-sh/cacheflush.h +++ b/include/asm-sh/cacheflush.h @@ -43,7 +43,7 @@ extern void __flush_purge_region(void *start, int size); extern void __flush_invalidate_region(void *start, int size); #endif -#ifdef CONFIG_CPU_SH4 +#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF) extern void copy_to_user_page(struct vm_area_struct *vma, struct page *page, unsigned long vaddr, void *dst, const void *src, unsigned long len); -- cgit v1.2.3 From 5131d4d83858e208f634622dc4a2e7042f796950 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 16 Nov 2007 18:42:18 +1100 Subject: [POWERPC] Fix declaration of pcibios_free_controller pcibios_free_controller() is now available for both 32 and 64 bits but the header only declares it for 64 bits. This moves the declaration down next to the pcibios_alloc_controller() one. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- include/asm-powerpc/pci-bridge.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index dc318458b5f..d8bdc79db12 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h @@ -246,7 +246,6 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) return PCI_DN(busdn)->phb; } -extern void pcibios_free_controller(struct pci_controller *phb); extern void isa_bridge_find_early(struct pci_controller *hose); @@ -282,9 +281,11 @@ extern void pci_process_bridge_OF_ranges(struct pci_controller *hose, struct device_node *dev, int primary); -/* Allocate a new PCI host bridge structure */ +/* Allocate & free a PCI host bridge structure */ extern struct pci_controller * pcibios_alloc_controller(struct device_node *dev); +extern void pcibios_free_controller(struct pci_controller *phb); + #ifdef CONFIG_PCI extern unsigned long pci_address_to_pio(phys_addr_t address); extern int pcibios_vaddr_is_ioport(void __iomem *address); -- cgit v1.2.3 From 52142e756e9bf6485d3d53596e8aff2e816a7253 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 19 Nov 2007 19:25:06 +1100 Subject: [POWERPC] Fix kmalloc alignment on non-coherent DMA platforms On platforms doing non-coherent DMA (4xx, 8xx, ...), it's important that the kmalloc minimum alignment is set to the cache line size, to avoid sharing cache lines between different objects, so that DMA to one of the objects doesn't corrupt the other. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- include/asm-powerpc/page_32.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/asm-powerpc/page_32.h b/include/asm-powerpc/page_32.h index 374d0db37e1..17110aff26e 100644 --- a/include/asm-powerpc/page_32.h +++ b/include/asm-powerpc/page_32.h @@ -6,6 +6,10 @@ #define PPC_MEMSTART 0 +#ifdef CONFIG_NOT_COHERENT_CACHE +#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES +#endif + #ifndef __ASSEMBLY__ /* * The basic type of a PTE - 64 bits for those CPUs with > 32 bit -- cgit v1.2.3 From ddc081a19585c8ba5aad437779950c2ef215360a Mon Sep 17 00:00:00 2001 From: Venkatesh Pallipadi Date: Mon, 19 Nov 2007 21:43:22 -0500 Subject: cpuidle: fix HP nx6125 regression Fix for http://bugzilla.kernel.org/show_bug.cgi?id=9355 cpuidle always used to fallback to C2 if there is some bm activity while entering C3. But, presence of C2 is not always guaranteed. Change cpuidle algorithm to detect a safe_state to fallback in case of bm_activity and use that state instead of C2. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Len Brown --- include/acpi/processor.h | 1 - include/linux/cpuidle.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 26d79f6db8a..76411b1fc4f 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -78,7 +78,6 @@ struct acpi_processor_cx { struct acpi_processor_power { struct cpuidle_device dev; struct acpi_processor_cx *state; - struct acpi_processor_cx *bm_state; unsigned long bm_check_timestamp; u32 default_state; u32 bm_activity; diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 16a51546db4..c4e00161a24 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -92,6 +92,7 @@ struct cpuidle_device { struct kobject kobj; struct completion kobj_unregister; void *governor_data; + struct cpuidle_state *safe_state; }; DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); -- cgit v1.2.3 From fbe481756df57673b6acbcd2e139d0d2658f2188 Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Tue, 20 Nov 2007 12:24:45 +1100 Subject: [POWERPC] vdso: Fixes for cache block sizes The current VDSO implementation is hardcoded to 128 byte cache blocks, which are only used on IBM's 64-bit processors. Convert it to get the cache block sizes out of vdso_data instead, similar to how the ppc64 in-kernel cache flush does it. Signed-off-by: Olof Johansson Signed-off-by: Paul Mackerras --- include/asm-powerpc/vdso_datapage.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/asm-powerpc/vdso_datapage.h b/include/asm-powerpc/vdso_datapage.h index 8a94f0eba5e..f01393224b5 100644 --- a/include/asm-powerpc/vdso_datapage.h +++ b/include/asm-powerpc/vdso_datapage.h @@ -77,6 +77,10 @@ struct vdso_data { /* those additional ones don't have to be located anywhere * special as they were not part of the original systemcfg */ + __u32 dcache_block_size; /* L1 d-cache block size */ + __u32 icache_block_size; /* L1 i-cache block size */ + __u32 dcache_log_block_size; /* L1 d-cache log block size */ + __u32 icache_log_block_size; /* L1 i-cache log block size */ __s32 wtom_clock_sec; /* Wall to monotonic clock */ __s32 wtom_clock_nsec; __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */ @@ -99,6 +103,10 @@ struct vdso_data { __s32 wtom_clock_sec; /* Wall to monotonic clock */ __s32 wtom_clock_nsec; __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */ + __u32 dcache_block_size; /* L1 d-cache block size */ + __u32 icache_block_size; /* L1 i-cache block size */ + __u32 dcache_log_block_size; /* L1 d-cache log block size */ + __u32 icache_log_block_size; /* L1 i-cache log block size */ }; #endif /* CONFIG_PPC64 */ -- cgit v1.2.3 From a2b51812a4dc5db09ab4d4638d4d8ed456e2457e Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Tue, 20 Nov 2007 12:28:15 +1100 Subject: [POWERPC] Fix RTAS os-term usage on kernel panic The rtas_os_term() routine was being called at the wrong time. The actual rtas call "os-term" will not ever return, and so calling it from the panic notifier is too early. Instead, call it from the machine_reset() call. This splits the rtas_os_term() routine into two: one part to capture the kernel panic message, invoked during the panic notifier, and another part that is invoked during machine_reset(). Prior to this patch, the os-term call was never being made, because panic_timeout was always non-zero. Calling os-term helps keep the hypervisor happy! We have to keep the hypervisor happy to avoid service, dump and error reporting problems. Signed-off-by: Linas Vepstas Signed-off-by: Paul Mackerras --- include/asm-powerpc/rtas.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index 8eaa7b28d9d..87db8728e82 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h @@ -164,7 +164,8 @@ extern int rtas_call(int token, int, int, int *, ...); extern void rtas_restart(char *cmd); extern void rtas_power_off(void); extern void rtas_halt(void); -extern void rtas_os_term(char *str); +extern void rtas_panic_msg(char *str); +extern void rtas_os_term(void); extern int rtas_get_sensor(int sensor, int index, int *state); extern int rtas_get_power_level(int powerdomain, int *level); extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); -- cgit v1.2.3 From 611cd55b155a89d9a0ce5f92a9cbabc5e284d0d4 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Mon, 19 Nov 2007 21:49:25 -0800 Subject: [IPVS]: Fix sysctl warnings about missing strategy Running the latest git code I get the following messages during boot: sysctl table check failed: /net/ipv4/vs/drop_entry .3.5.21.4 Missing strategy [...] sysctl table check failed: /net/ipv4/vs/drop_packet .3.5.21.5 Missing strategy [...] sysctl table check failed: /net/ipv4/vs/secure_tcp .3.5.21.6 Missing strategy [...] sysctl table check failed: /net/ipv4/vs/sync_threshold .3.5.21.24 Missing strategy I removed the binary sysctl handler for those messages and also removed the definitions in ip_vs.h. The alternative would be to implement a proper strategy handler, but syscall sysctl is deprecated. There are other sysctl definitions that are commented out or work with the default sysctl_data strategy. I did not touch these. Signed-off-by: Christian Borntraeger Acked-by: Simon Horman Signed-off-by: David S. Miller --- include/net/ip_vs.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 67ea2c0c0ab..b362c8c1497 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -336,9 +336,6 @@ enum { NET_IPV4_VS_DEBUG_LEVEL=1, NET_IPV4_VS_AMEMTHRESH=2, NET_IPV4_VS_AMDROPRATE=3, - NET_IPV4_VS_DROP_ENTRY=4, - NET_IPV4_VS_DROP_PACKET=5, - NET_IPV4_VS_SECURE_TCP=6, NET_IPV4_VS_TO_ES=7, NET_IPV4_VS_TO_SS=8, NET_IPV4_VS_TO_SR=9, @@ -355,7 +352,6 @@ enum { NET_IPV4_VS_LBLCR_EXPIRE=20, NET_IPV4_VS_CACHE_BYPASS=22, NET_IPV4_VS_EXPIRE_NODEST_CONN=23, - NET_IPV4_VS_SYNC_THRESHOLD=24, NET_IPV4_VS_NAT_ICMP_SEND=25, NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE=26, NET_IPV4_VS_LAST -- cgit v1.2.3 From 9e103fa6bd53147e228e941256803a6b8927cdb9 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 19 Nov 2007 21:50:21 -0800 Subject: [IPVS]: Fix sysctl warnings about missing strategy in schedulers sysctl table check failed: /net/ipv4/vs/lblc_expiration .3.5.21.19 Missing strategy [...] sysctl table check failed: /net/ipv4/vs/lblcr_expiration .3.5.21.20 Missing strategy Switch these entried over to use CTL_UNNUMBERED as clearly the sys_syscal portion wasn't working. This is along the same lines as Christian Borntraeger's patch that fixes up entries with no stratergy in net/ipv4/ipvs/ip_vs_ctl.c Signed-off-by: Simon Horman Signed-off-by: David S. Miller --- include/net/ip_vs.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index b362c8c1497..f1c41eede99 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -348,8 +348,6 @@ enum { NET_IPV4_VS_TO_SA=16, NET_IPV4_VS_TO_UDP=17, NET_IPV4_VS_TO_ICMP=18, - NET_IPV4_VS_LBLC_EXPIRE=19, - NET_IPV4_VS_LBLCR_EXPIRE=20, NET_IPV4_VS_CACHE_BYPASS=22, NET_IPV4_VS_EXPIRE_NODEST_CONN=23, NET_IPV4_VS_NAT_ICMP_SEND=25, -- cgit v1.2.3 From 9055fa1f3ded5ad858a55ae18439ed55227ee7eb Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Mon, 19 Nov 2007 21:51:13 -0800 Subject: [IPVS]: Move remaining sysctl handlers over to CTL_UNNUMBERED Switch the remaining IPVS sysctl entries over to to use CTL_UNNUMBERED, I stronly doubt that anyone is using the sys_sysctl interface to these variables. Signed-off-by: Simon Horman Signed-off-by: David S. Miller --- include/net/ip_vs.h | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'include') diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index f1c41eede99..8a7d59be8a0 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -327,34 +327,6 @@ extern int ip_vs_get_debug_level(void); #define FTPPORT __constant_htons(21) #define FTPDATA __constant_htons(20) -/* - * IPVS sysctl variables under the /proc/sys/net/ipv4/vs/ - */ -#define NET_IPV4_VS 21 - -enum { - NET_IPV4_VS_DEBUG_LEVEL=1, - NET_IPV4_VS_AMEMTHRESH=2, - NET_IPV4_VS_AMDROPRATE=3, - NET_IPV4_VS_TO_ES=7, - NET_IPV4_VS_TO_SS=8, - NET_IPV4_VS_TO_SR=9, - NET_IPV4_VS_TO_FW=10, - NET_IPV4_VS_TO_TW=11, - NET_IPV4_VS_TO_CL=12, - NET_IPV4_VS_TO_CW=13, - NET_IPV4_VS_TO_LA=14, - NET_IPV4_VS_TO_LI=15, - NET_IPV4_VS_TO_SA=16, - NET_IPV4_VS_TO_UDP=17, - NET_IPV4_VS_TO_ICMP=18, - NET_IPV4_VS_CACHE_BYPASS=22, - NET_IPV4_VS_EXPIRE_NODEST_CONN=23, - NET_IPV4_VS_NAT_ICMP_SEND=25, - NET_IPV4_VS_EXPIRE_QUIESCENT_TEMPLATE=26, - NET_IPV4_VS_LAST -}; - /* * TCP State Values */ -- cgit v1.2.3 From 61fd47e0c84764f49b4e52bfd8170fac52636f00 Mon Sep 17 00:00:00 2001 From: Shaohua Li Date: Sat, 17 Nov 2007 01:05:28 -0500 Subject: ACPI: fix two IRQ8 issues in IOAPIC mode Use mp_irqs[] to get PNP device's interrupt polarity and trigger. There are two reasons to do this: 1. BIOS bug for PNP interrupt 2. BIOS explictly does override mp_irqs[] should cover all the cases. http://bugzilla.kernel.org/show_bug.cgi?id=5243 http://bugzilla.kernel.org/show_bug.cgi?id=7679 http://bugzilla.kernel.org/show_bug.cgi?id=9153 [lenb: fixed !IOAPIC and 64-bit !SMP builds] Signed-off-by: Shaohua Li Signed-off-by: Len Brown --- include/linux/acpi.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 8ccedf7a0a5..e3c16c981e4 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -132,6 +132,11 @@ extern unsigned long acpi_realmode_flags; int acpi_register_gsi (u32 gsi, int triggering, int polarity); int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); +#ifdef CONFIG_X86_IO_APIC +extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity); +#else +#define acpi_get_override_irq(bus, trigger, polarity) (-1) +#endif /* * This function undoes the effect of one call to acpi_register_gsi(). * If this matches the last registration, any IRQ resources for gsi -- cgit v1.2.3 From 6e42141009ff18297fe19d19296738b742f861db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilpo=20J=E4rvinen?= Date: Mon, 19 Nov 2007 23:24:09 -0800 Subject: [TCP] MTUprobe: fix potential sk_send_head corruption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the abstraction functions got added, conversion here was made incorrectly. As a result, the skb may end up pointing to skb which got included to the probe skb and then was freed. For it to trigger, however, skb_transmit must fail sending as well. Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller --- include/net/tcp.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/net/tcp.h b/include/net/tcp.h index d695cea7730..cb5b033e0e5 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1288,6 +1288,9 @@ static inline void tcp_insert_write_queue_before(struct sk_buff *new, struct sock *sk) { __skb_insert(new, skb->prev, skb, &sk->sk_write_queue); + + if (sk->sk_send_head == skb) + sk->sk_send_head = new; } static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk) -- cgit v1.2.3 From 411788ea7fca01ee803af8225ac35807b4d02050 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Tue, 20 Nov 2007 11:13:32 +0100 Subject: [S390] Fix irq tracing and lockdep_sys_exit calls. Current support for TRACE_IRQFLAGS and lockdep_sys_exit is broken. IRQ flag tracing is broken for program checks. Even worse is that the newly introduced calls to lockdep_sys_exit are in the critical section code which is not supposed to call any C functions. In addition the checks if locks are still held are also done when returning to kernel code which is broken as well. Fix all this by disabling interrupts and machine checks at the exit paths and then do the appropriate checks and calls. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- include/asm-s390/system.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index d866d338555..44bda786eef 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h @@ -388,6 +388,11 @@ extern void (*_machine_power_off)(void); #define arch_align_stack(x) (x) +#ifdef CONFIG_TRACE_IRQFLAGS +extern psw_t sysc_restore_trace_psw; +extern psw_t io_restore_trace_psw; +#endif + #endif /* __KERNEL__ */ #endif -- cgit v1.2.3 From 43ebbf119a9670d8f08b9e57968e109c770f8636 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Tue, 20 Nov 2007 11:13:33 +0100 Subject: [S390] cmm: remove unused binary sysctls. Remove binary sysctls that never worked due to missing strategy functions. Cc: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Martin Schwidefsky --- include/linux/sysctl.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index e99171f01b4..35b698120af 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -207,11 +207,6 @@ enum VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ - - /* s390 vm cmm sysctls */ - VM_CMM_PAGES=1111, - VM_CMM_TIMED_PAGES=1112, - VM_CMM_TIMEOUT=1113, }; -- cgit v1.2.3 From 37e3a6ac5a30468021a2f366e497d455bbcb5d21 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Tue, 20 Nov 2007 11:13:34 +0100 Subject: [S390] appldata: remove unused binary sysctls. Remove binary sysctls that never worked due to missing strategy functions. Cc: "Eric W. Biederman" Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- include/linux/sysctl.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 35b698120af..4f5047df8a9 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -70,7 +70,6 @@ enum CTL_ABI=9, /* Binary emulation */ CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ CTL_ARLAN=254, /* arlan wireless driver */ - CTL_APPLDATA=2120, /* s390 appldata */ CTL_S390DBF=5677, /* s390 debug */ CTL_SUNRPC=7249, /* sunrpc debug */ CTL_PM=9899, /* frv power management */ -- cgit v1.2.3 From 7cb41c65b3fc547da4050721445d07277768aa37 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 20 Nov 2007 20:16:43 +0100 Subject: [ALSA] version 1.0.15 Signed-off-by: Jaroslav Kysela --- include/sound/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/sound/version.h b/include/sound/version.h index a2be8ad8894..a9781eb0da0 100644 --- a/include/sound/version.h +++ b/include/sound/version.h @@ -1,3 +1,3 @@ /* include/version.h. Generated by alsa/ksync script. */ #define CONFIG_SND_VERSION "1.0.15" -#define CONFIG_SND_DATE " (Tue Oct 23 06:09:18 2007 UTC)" +#define CONFIG_SND_DATE " (Tue Nov 20 19:16:42 2007 UTC)" -- cgit v1.2.3 From 92468c53cf5af0aea06caec7b7d416c18e973685 Mon Sep 17 00:00:00 2001 From: Guillaume Chazarain Date: Mon, 19 Nov 2007 10:07:00 +0100 Subject: ieee80211: Stop net_ratelimit/IEEE80211_DEBUG_DROP log pollution if (net_ratelimit()) IEEE80211_DEBUG_DROP(...) can pollute the logs with messages like: printk: 1 messages suppressed. printk: 2 messages suppressed. printk: 7 messages suppressed. if debugging information is disabled. These messages are printed by net_ratelimit(). Add a wrapper to net_ratelimit() that takes into account the log level, so that net_ratelimit() is called only when we really want to print something. Signed-off-by: Guillaume Chazarain Signed-off-by: John W. Linville --- include/net/ieee80211.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index 164d1321116..d8ae48439f1 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h @@ -115,8 +115,16 @@ extern u32 ieee80211_debug_level; do { if (ieee80211_debug_level & (level)) \ printk(KERN_DEBUG "ieee80211: %c %s " fmt, \ in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) +static inline bool ieee80211_ratelimit_debug(u32 level) +{ + return (ieee80211_debug_level & level) && net_ratelimit(); +} #else #define IEEE80211_DEBUG(level, fmt, args...) do {} while (0) +static inline bool ieee80211_ratelimit_debug(u32 level) +{ + return false; +} #endif /* CONFIG_IEEE80211_DEBUG */ /* escape_essid() is intended to be used in debug (and possibly error) -- cgit v1.2.3 From d0025e5edf0e593da599358d70fdade47c3b703e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 15:34:51 +0800 Subject: Blackfin arch: move EXPORT_SYMBOL() to C files where the symbol is actually defined Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/string.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asm-blackfin/string.h b/include/asm-blackfin/string.h index e8ada91ab00..321f4d96e4a 100644 --- a/include/asm-blackfin/string.h +++ b/include/asm-blackfin/string.h @@ -1,6 +1,8 @@ #ifndef _BLACKFIN_STRING_H_ #define _BLACKFIN_STRING_H_ +#include + #ifdef __KERNEL__ /* only set these up for kernel code */ #define __HAVE_ARCH_STRCPY -- cgit v1.2.3 From 8d6c242062b90ce1b339e32a12fe183fe9612dcb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 15:53:49 +0800 Subject: Blackfin arch: rename _return_from_exception to _bfin_return_from_exception and export it Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/bfin-global.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index cd924bb6f2e..6ef501b35df 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h @@ -62,6 +62,7 @@ extern void bfin_dcache_init(void); extern int read_iloc(void); extern int bfin_console_init(void); extern asmlinkage void lower_to_irq14(void); +extern asmlinkage void bfin_return_from_exception(void); extern void init_exception_vectors(void); extern void init_dma(void); extern void program_IAR(void); -- cgit v1.2.3 From b5f87aa41db4d5cd64ca77f10b33fdfba61a47d7 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 16:04:49 +0800 Subject: Blackfin arch: cleanup BF54x header file and add BF547 definition Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/mach-bf548/bf548.h | 34 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/mach-bf548/bf548.h b/include/asm-blackfin/mach-bf548/bf548.h index 7e6d349beb0..e748588e893 100644 --- a/include/asm-blackfin/mach-bf548/bf548.h +++ b/include/asm-blackfin/mach-bf548/bf548.h @@ -106,24 +106,22 @@ #define AMGCTLVAL (V_AMBEN | V_AMCKEN) -#ifdef CONFIG_BF542 -#define CPU "BF542" -#define CPUID 0x027c8000 -#endif -#ifdef CONFIG_BF544 -#define CPU "BF544" -#define CPUID 0x027c8000 -#endif -#ifdef CONFIG_BF548 -#define CPU "BF548" -#define CPUID 0x027c6000 -#endif -#ifdef CONFIG_BF549 -#define CPU "BF549" -#endif -#ifndef CPU -#define CPU "UNKNOWN" -#define CPUID 0x0 +#if defined(CONFIG_BF542) +# define CPU "BF542" +# define CPUID 0x027c8000 +#elif defined(CONFIG_BF544) +# define CPU "BF544" +# define CPUID 0x027c8000 +#elif defined(CONFIG_BF547) +# define CPU "BF547" +#elif defined(CONFIG_BF548) +# define CPU "BF548" +# define CPUID 0x027c6000 +#elif defined(CONFIG_BF549) +# define CPU "BF549" +#else +# define CPU "UNKNOWN" +# define CPUID 0x0 #endif #endif /* __MACH_BF48_H__ */ -- cgit v1.2.3 From 9e83b98a79d25136282a1757f879c40ee929a28b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 16:08:58 +0800 Subject: Blackfin arch: add support for working around anomaly 05000312 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Anomaly 05000312 - Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted: DESCRIPTION: When instruction cache is enabled, erroneous behavior may occur when any of the following instructions are interrupted: . CSYNC • SSYNC • LCx = • LTx = (only when LCx is non-zero) • LBx = (only when LCx is non-zero) When this problem occurs, a variety of incorrect things could happen, including an illegal instruction exception. Additional errors could show up as an exception, a hardware error, or an instruction that is valid but different than the one that was expected. WORKAROUND: Place a cli before all SSYNC, CSYNC, "LCx =", "LTx =", and "LBx =" instructions to disable interrupts, and place an sti after each of these instructions to re-enable interrupts. When these instructions are executed in code that is already non-interruptible, the problem will not occur. Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/delay.h | 66 ++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/delay.h b/include/asm-blackfin/delay.h index 52e7a10d7ff..473a8113277 100644 --- a/include/asm-blackfin/delay.h +++ b/include/asm-blackfin/delay.h @@ -1,29 +1,47 @@ -#ifndef _BLACKFIN_DELAY_H -#define _BLACKFIN_DELAY_H - -static inline void __delay(unsigned long loops) -{ - -/* FIXME: Currently the assembler doesn't recognize Loop Register Clobbers, - uncomment this as soon those are implemented */ /* - __asm__ __volatile__ ( "\t LSETUP (1f,1f) LC0= %0\n\t" - "1:\t NOP;\n\t" - : :"a" (loops) - : "LT0","LB0","LC0"); + * delay.h - delay functions + * + * Copyright (c) 2004-2007 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ + +#ifndef __ASM_DELAY_H__ +#define __ASM_DELAY_H__ -*/ +#include - __asm__ __volatile__("[--SP] = LC0;\n\t" - "[--SP] = LT0;\n\t" - "[--SP] = LB0;\n\t" - "LSETUP (1f,1f) LC0 = %0;\n\t" - "1:\t NOP;\n\t" - "LB0 = [SP++];\n\t" - "LT0 = [SP++];\n\t" - "LC0 = [SP++];\n" - : - :"a" (loops)); +static inline void __delay(unsigned long loops) +{ + if (ANOMALY_05000312) { + /* Interrupted loads to loop registers -> bad */ + unsigned long tmp; + __asm__ __volatile__( + "[--SP] = LC0;" + "[--SP] = LT0;" + "[--SP] = LB0;" + "LSETUP (1f,1f) LC0 = %1;" + "1: NOP;" + /* We take advantage of the fact that LC0 is 0 at + * the end of the loop. Otherwise we'd need some + * NOPs after the CLI here. + */ + "CLI %0;" + "LB0 = [SP++];" + "LT0 = [SP++];" + "LC0 = [SP++];" + "STI %0;" + : "=d" (tmp) + : "a" (loops) + ); + } else + __asm__ __volatile__ ( + "LSETUP(1f, 1f) LC0 = %0;" + "1: NOP;" + : + : "a" (loops) + : "LT0", "LB0", "LC0" + ); } #include /* needed for HZ */ @@ -41,4 +59,4 @@ static inline void udelay(unsigned long usecs) __delay(usecs * loops_per_jiffy / (1000000 / HZ)); } -#endif /* defined(_BLACKFIN_DELAY_H) */ +#endif -- cgit v1.2.3 From 9f2ff54d7291d4386dc02d6a153e6cc621f32aa8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 15:57:53 +0800 Subject: Blackfin arch: fix broken on BF52x, remove silly checks on processors for L1_SCRATCH defines Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/mach-bf527/mem_map.h | 2 -- include/asm-blackfin/mach-bf533/mem_map.h | 2 -- include/asm-blackfin/mach-bf537/mem_map.h | 2 -- include/asm-blackfin/mach-bf548/mem_map.h | 2 -- include/asm-blackfin/mach-bf561/mem_map.h | 2 -- 5 files changed, 10 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/mach-bf527/mem_map.h b/include/asm-blackfin/mach-bf527/mem_map.h index c5aa20102b2..bb046984231 100644 --- a/include/asm-blackfin/mach-bf527/mem_map.h +++ b/include/asm-blackfin/mach-bf527/mem_map.h @@ -90,9 +90,7 @@ /* Scratch Pad Memory */ -#if defined(CONFIG_BF527) || defined(CONFIG_BF536) || defined(CONFIG_BF534) #define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_LENGTH 0x1000 -#endif #endif /* _MEM_MAP_527_H_ */ diff --git a/include/asm-blackfin/mach-bf533/mem_map.h b/include/asm-blackfin/mach-bf533/mem_map.h index 94d8c4062eb..8daf6d4bf09 100644 --- a/include/asm-blackfin/mach-bf533/mem_map.h +++ b/include/asm-blackfin/mach-bf533/mem_map.h @@ -160,9 +160,7 @@ /* Scratch Pad Memory */ -#if defined(CONFIG_BF533) || defined(CONFIG_BF532) || defined(CONFIG_BF531) #define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_LENGTH 0x1000 -#endif #endif /* _MEM_MAP_533_H_ */ diff --git a/include/asm-blackfin/mach-bf537/mem_map.h b/include/asm-blackfin/mach-bf537/mem_map.h index 18759e38eaa..f5facdad444 100644 --- a/include/asm-blackfin/mach-bf537/mem_map.h +++ b/include/asm-blackfin/mach-bf537/mem_map.h @@ -167,9 +167,7 @@ /* Scratch Pad Memory */ -#if defined(CONFIG_BF537) || defined(CONFIG_BF536) || defined(CONFIG_BF534) #define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_LENGTH 0x1000 -#endif #endif /* _MEM_MAP_537_H_ */ diff --git a/include/asm-blackfin/mach-bf548/mem_map.h b/include/asm-blackfin/mach-bf548/mem_map.h index ec1597e3183..bacec345589 100644 --- a/include/asm-blackfin/mach-bf548/mem_map.h +++ b/include/asm-blackfin/mach-bf548/mem_map.h @@ -89,9 +89,7 @@ /* Scratch Pad Memory */ -#if defined(CONFIG_BF54x) #define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_LENGTH 0x1000 -#endif #endif/* _MEM_MAP_548_H_ */ diff --git a/include/asm-blackfin/mach-bf561/mem_map.h b/include/asm-blackfin/mach-bf561/mem_map.h index f7ac09cf2c3..300a3a90d61 100644 --- a/include/asm-blackfin/mach-bf561/mem_map.h +++ b/include/asm-blackfin/mach-bf561/mem_map.h @@ -67,9 +67,7 @@ /* Scratch Pad Memory */ -#if defined(CONFIG_BF561) #define L1_SCRATCH_START 0xFFB00000 #define L1_SCRATCH_LENGTH 0x1000 -#endif #endif /* _MEM_MAP_533_H_ */ -- cgit v1.2.3 From 81a487a59f246a9eba24c3622e4c964e3347239d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 15:55:45 +0800 Subject: Blackfin arch: cleanup the cplb declares - no need to declare their sizes in the common header - no need to tack on the section attribute as only the definition matters, not references Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/cplbinit.h | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/cplbinit.h b/include/asm-blackfin/cplbinit.h index bec6ecdf1bd..c4d0596e8e9 100644 --- a/include/asm-blackfin/cplbinit.h +++ b/include/asm-blackfin/cplbinit.h @@ -27,6 +27,9 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef __ASM_CPLBINIT_H__ +#define __ASM_CPLBINIT_H__ + #include #include @@ -57,8 +60,8 @@ struct cplb_tab { u16 size; }; -extern u_long icplb_table[MAX_CPLBS+1]; -extern u_long dcplb_table[MAX_CPLBS+1]; +extern u_long icplb_table[]; +extern u_long dcplb_table[]; /* Till here we are discussing about the static memory management model. * However, the operating envoronments commonly define more CPLB @@ -69,28 +72,16 @@ extern u_long dcplb_table[MAX_CPLBS+1]; * This is how Page descriptor Table is implemented in uClinux/Blackfin. */ -#ifdef CONFIG_CPLB_SWITCH_TAB_L1 -extern u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data)); -extern u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data)); - -#ifdef CONFIG_CPLB_INFO -extern u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data)); -extern u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data)); -#endif /* CONFIG_CPLB_INFO */ - -#else - -extern u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]; -extern u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]; - +extern u_long ipdt_table[]; +extern u_long dpdt_table[]; #ifdef CONFIG_CPLB_INFO -extern u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]; -extern u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]; -#endif /* CONFIG_CPLB_INFO */ - -#endif /*CONFIG_CPLB_SWITCH_TAB_L1*/ +extern u_long ipdt_swapcount_table[]; +extern u_long dpdt_swapcount_table[]; +#endif extern unsigned long reserved_mem_dcache_on; extern unsigned long reserved_mem_icache_on; extern void generate_cpl_tables(void); + +#endif -- cgit v1.2.3 From c3a9f435ae1b1969736a6ca695dfbc508b917b65 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 16:12:12 +0800 Subject: Blackfin arch: cplb and map header file cleanup - remove duplicated defines for the BF561 - generalize L2 support (so that it works for BF54x) and mark it executable - add support for reading/executing the Boot ROM sections (since it has data/functions we may need at runtime) - and fixup names for each map Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/mach-bf527/mem_map.h | 1 + include/asm-blackfin/mach-bf533/mem_map.h | 2 +- include/asm-blackfin/mach-bf537/mem_map.h | 1 + include/asm-blackfin/mach-bf548/mem_map.h | 11 +++++++++++ include/asm-blackfin/mach-bf561/bf561.h | 19 ------------------- include/asm-blackfin/mach-bf561/mem_map.h | 5 +++++ 6 files changed, 19 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/mach-bf527/mem_map.h b/include/asm-blackfin/mach-bf527/mem_map.h index bb046984231..193082deaa4 100644 --- a/include/asm-blackfin/mach-bf527/mem_map.h +++ b/include/asm-blackfin/mach-bf527/mem_map.h @@ -47,6 +47,7 @@ /* Boot ROM Memory */ #define BOOT_ROM_START 0xEF000000 +#define BOOT_ROM_LENGTH 0x8000 /* Level 1 Memory */ diff --git a/include/asm-blackfin/mach-bf533/mem_map.h b/include/asm-blackfin/mach-bf533/mem_map.h index 8daf6d4bf09..bd30b6f3be0 100644 --- a/include/asm-blackfin/mach-bf533/mem_map.h +++ b/include/asm-blackfin/mach-bf533/mem_map.h @@ -1,4 +1,3 @@ - /* * File: include/asm-blackfin/mach-bf533/mem_map.h * Based on: @@ -48,6 +47,7 @@ /* Boot ROM Memory */ #define BOOT_ROM_START 0xEF000000 +#define BOOT_ROM_LENGTH 0x400 /* Level 1 Memory */ diff --git a/include/asm-blackfin/mach-bf537/mem_map.h b/include/asm-blackfin/mach-bf537/mem_map.h index f5facdad444..5c6726d6f3b 100644 --- a/include/asm-blackfin/mach-bf537/mem_map.h +++ b/include/asm-blackfin/mach-bf537/mem_map.h @@ -47,6 +47,7 @@ /* Boot ROM Memory */ #define BOOT_ROM_START 0xEF000000 +#define BOOT_ROM_LENGTH 0x800 /* Level 1 Memory */ diff --git a/include/asm-blackfin/mach-bf548/mem_map.h b/include/asm-blackfin/mach-bf548/mem_map.h index bacec345589..00752f77498 100644 --- a/include/asm-blackfin/mach-bf548/mem_map.h +++ b/include/asm-blackfin/mach-bf548/mem_map.h @@ -47,6 +47,7 @@ /* Boot ROM Memory */ #define BOOT_ROM_START 0xEF000000 +#define BOOT_ROM_LENGTH 0x1000 /* Level 1 Memory */ @@ -87,6 +88,16 @@ #define BFIN_DSUPBANKS 0 #endif /*CONFIG_BFIN_DCACHE*/ +/* Level 2 Memory */ +#if !defined(CONFIG_BF542) +# define L2_START 0xFEB00000 +# if defined(CONFIG_BF544) +# define L2_LENGTH 0x10000 +# else +# define L2_LENGTH 0x20000 +# endif +#endif + /* Scratch Pad Memory */ #define L1_SCRATCH_START 0xFFB00000 diff --git a/include/asm-blackfin/mach-bf561/bf561.h b/include/asm-blackfin/mach-bf561/bf561.h index 17e1d5dcef0..3ef9e5f3613 100644 --- a/include/asm-blackfin/mach-bf561/bf561.h +++ b/include/asm-blackfin/mach-bf561/bf561.h @@ -33,25 +33,6 @@ #define SUPPORTED_REVID 0x3 #define OFFSET_(x) ((x) & 0x0000FFFF) -#define L1_ISRAM 0xFFA00000 -#define L1_ISRAM_END 0xFFA04000 -#define DATA_BANKA_SRAM 0xFF800000 -#define DATA_BANKA_SRAM_END 0xFF804000 -#define DATA_BANKB_SRAM 0xFF900000 -#define DATA_BANKB_SRAM_END 0xFF904000 -#define L1_DSRAMA 0xFF800000 -#define L1_DSRAMA_END 0xFF804000 -#define L1_DSRAMB 0xFF900000 -#define L1_DSRAMB_END 0xFF904000 -#define L2_SRAM 0xFEB00000 -#define L2_SRAM_END 0xFEB20000 -#define AMB_FLASH 0x20000000 -#define AMB_FLASH_END 0x21000000 -#define AMB_FLASH_LENGTH 0x01000000 -#define L1_ISRAM_LENGTH 0x4000 -#define L1_DSRAMA_LENGTH 0x4000 -#define L1_DSRAMB_LENGTH 0x4000 -#define L2_SRAM_LENGTH 0x20000 /*some misc defines*/ #define IMASK_IVG15 0x8000 diff --git a/include/asm-blackfin/mach-bf561/mem_map.h b/include/asm-blackfin/mach-bf561/mem_map.h index 300a3a90d61..c26d8486cc4 100644 --- a/include/asm-blackfin/mach-bf561/mem_map.h +++ b/include/asm-blackfin/mach-bf561/mem_map.h @@ -19,6 +19,11 @@ #define ASYNC_BANK0_BASE 0x20000000 /* Async Bank 0 */ #define ASYNC_BANK0_SIZE 0x04000000 /* 64M */ +/* Boot ROM Memory */ + +#define BOOT_ROM_START 0xEF000000 +#define BOOT_ROM_LENGTH 0x800 + /* Level 1 Memory */ #ifdef CONFIG_BFIN_ICACHE -- cgit v1.2.3 From b0187854d902f897f98a1712fa9f097b13d7a554 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 16:14:03 +0800 Subject: Blackfin arch: add defines for the on-chip L1 ROM of BF54x Should not need separate cplb entry though as we cover L1 with a 4 meg page Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/mach-bf548/mem_map.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/asm-blackfin/mach-bf548/mem_map.h b/include/asm-blackfin/mach-bf548/mem_map.h index 00752f77498..f99f47bc3a0 100644 --- a/include/asm-blackfin/mach-bf548/mem_map.h +++ b/include/asm-blackfin/mach-bf548/mem_map.h @@ -49,6 +49,11 @@ #define BOOT_ROM_START 0xEF000000 #define BOOT_ROM_LENGTH 0x1000 +/* L1 Instruction ROM */ + +#define L1_ROM_START 0xFFA14000 +#define L1_ROM_LENGTH 0x10000 + /* Level 1 Memory */ /* Memory Map for ADSP-BF548 processors */ -- cgit v1.2.3 From f26825de49d2e1a12eee54cd855b56b768f4d7bd Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 16:17:11 +0800 Subject: Blackfin arch: convert READY to DMA_READY as it causes build errors in common sound code otherwise Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/mach-bf548/defBF544.h | 2 +- include/asm-blackfin/mach-bf548/defBF548.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/mach-bf548/defBF544.h b/include/asm-blackfin/mach-bf548/defBF544.h index 760307e34b9..b8b9870e269 100644 --- a/include/asm-blackfin/mach-bf548/defBF544.h +++ b/include/asm-blackfin/mach-bf548/defBF544.h @@ -645,7 +645,7 @@ /* Bit masks for HOST_STATUS */ -#define READY 0x1 /* DMA Ready */ +#define DMA_READY 0x1 /* DMA Ready */ #define FIFOFULL 0x2 /* FIFO Full */ #define FIFOEMPTY 0x4 /* FIFO Empty */ #define COMPLETE 0x8 /* DMA Complete */ diff --git a/include/asm-blackfin/mach-bf548/defBF548.h b/include/asm-blackfin/mach-bf548/defBF548.h index 70af33c963b..ecbca952985 100644 --- a/include/asm-blackfin/mach-bf548/defBF548.h +++ b/include/asm-blackfin/mach-bf548/defBF548.h @@ -1007,7 +1007,7 @@ /* Bit masks for HOST_STATUS */ -#define READY 0x1 /* DMA Ready */ +#define DMA_READY 0x1 /* DMA Ready */ #define FIFOFULL 0x2 /* FIFO Full */ #define FIFOEMPTY 0x4 /* FIFO Empty */ #define COMPLETE 0x8 /* DMA Complete */ -- cgit v1.2.3 From 569a50ca3f56cd69199733580e7ca0e81029473a Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Wed, 21 Nov 2007 16:35:57 +0800 Subject: Blackfin arch: Ensure we printk out strings with the proper loglevel Signed-off-by: Robin Getz Signed-off-by: Bryan Wu --- include/asm-blackfin/traps.h | 96 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 74 insertions(+), 22 deletions(-) (limited to 'include') diff --git a/include/asm-blackfin/traps.h b/include/asm-blackfin/traps.h index fe365b1b7ca..ee1cbf73a9a 100644 --- a/include/asm-blackfin/traps.h +++ b/include/asm-blackfin/traps.h @@ -48,28 +48,80 @@ #ifndef __ASSEMBLY__ -#define HWC_x2 "System MMR Error\nAn error occurred due to an invalid access to an System MMR location\nPossible reason: a 32-bit register is accessed with a 16-bit instruction,\nor a 16-bit register is accessed with a 32-bit instruction.\n" -#define HWC_x3 "External Memory Addressing Error\n" -#define HWC_x12 "Performance Monitor Overflow\n" -#define HWC_x18 "RAISE 5 instruction\n Software issued a RAISE 5 instruction to invoke the Hardware\n" -#define HWC_default "Reserved\n" - -#define EXC_0x03 "Application stack overflow\n - Please increase the stack size of the application using elf2flt -s option,\n and/or reduce the stack use of the application.\n" -#define EXC_0x10 "Single step\n - When the processor is in single step mode, every instruction\n generates an exception. Primarily used for debugging.\n" -#define EXC_0x11 "Exception caused by a trace buffer full condition\n - The processor takes this exception when the trace\n buffer overflows (only when enabled by the Trace Unit Control register).\n" -#define EXC_0x21 "Undefined instruction\n - May be used to emulate instructions that are not defined for\n a particular processor implementation.\n" -#define EXC_0x22 "Illegal instruction combination\n - See section for multi-issue rules in the ADSP-BF53x Blackfin\n Processor Instruction Set Reference.\n" -#define EXC_0x23 "Data access CPLB protection violation\n - Attempted read or write to Supervisor resource,\n or illegal data memory access. \n" -#define EXC_0x24 "Data access misaligned address violation\n - Attempted misaligned data memory or data cache access.\n" -#define EXC_0x25 "Unrecoverable event\n - For example, an exception generated while processing a previous exception.\n" -#define EXC_0x26 "Data access CPLB miss\n - Used by the MMU to signal a CPLB miss on a data access.\n" -#define EXC_0x27 "Data access multiple CPLB hits\n - More than one CPLB entry matches data fetch address.\n" -#define EXC_0x28 "Program Sequencer Exception caused by an emulation watchpoint match\n - There is a watchpoint match, and one of the EMUSW\n bits in the Watchpoint Instruction Address Control register (WPIACTL) is set.\n" -#define EXC_0x2A "Instruction fetch misaligned address violation\n - Attempted misaligned instruction cache fetch. On a misaligned instruction fetch exception,\n the return address provided in RETX is the destination address which is misaligned, rather than the address of the offending instruction.\n" -#define EXC_0x2B "CPLB protection violation\n - Illegal instruction fetch access (memory protection violation).\n" -#define EXC_0x2C "Instruction fetch CPLB miss\n - CPLB miss on an instruction fetch.\n" -#define EXC_0x2D "Instruction fetch multiple CPLB hits\n - More than one CPLB entry matches instruction fetch address.\n" -#define EXC_0x2E "Illegal use of supervisor resource\n - Attempted to use a Supervisor register or instruction from User mode.\n Supervisor resources are registers and instructions that are reserved\n for Supervisor use: Supervisor only registers, all MMRs, and Supervisor\n only instructions.\n" +#define HWC_x2(level) \ + "System MMR Error\n" \ + level " - An error occurred due to an invalid access to an System MMR location\n" \ + level " Possible reason: a 32-bit register is accessed with a 16-bit instruction\n" \ + level " or a 16-bit register is accessed with a 32-bit instruction.\n" +#define HWC_x3(level) \ + "External Memory Addressing Error\n" +#define HWC_x12(level) \ + "Performance Monitor Overflow\n" +#define HWC_x18(level) \ + "RAISE 5 instruction\n" \ + level " Software issued a RAISE 5 instruction to invoke the Hardware\n" +#define HWC_default(level) \ + "Reserved\n" +#define EXC_0x03(level) \ + "Application stack overflow\n" \ + level " - Please increase the stack size of the application using elf2flt -s option,\n" \ + level " and/or reduce the stack use of the application.\n" +#define EXC_0x10(level) \ + "Single step\n" \ + level " - When the processor is in single step mode, every instruction\n" \ + level " generates an exception. Primarily used for debugging.\n" +#define EXC_0x11(level) \ + "Exception caused by a trace buffer full condition\n" \ + level " - The processor takes this exception when the trace\n" \ + level " buffer overflows (only when enabled by the Trace Unit Control register).\n" +#define EXC_0x21(level) \ + "Undefined instruction\n" \ + level " - May be used to emulate instructions that are not defined for\n" \ + level " a particular processor implementation.\n" +#define EXC_0x22(level) \ + "Illegal instruction combination\n" \ + level " - See section for multi-issue rules in the ADSP-BF53x Blackfin\n" \ + level " Processor Instruction Set Reference.\n" +#define EXC_0x23(level) \ + "Data access CPLB protection violation\n" \ + level " - Attempted read or write to Supervisor resource,\n" \ + level " or illegal data memory access. \n" +#define EXC_0x24(level) \ + "Data access misaligned address violation\n" \ + level " - Attempted misaligned data memory or data cache access.\n" +#define EXC_0x25(level) \ + "Unrecoverable event\n" \ + level " - For example, an exception generated while processing a previous exception.\n" +#define EXC_0x26(level) \ + "Data access CPLB miss\n" \ + level " - Used by the MMU to signal a CPLB miss on a data access.\n" +#define EXC_0x27(level) \ + "Data access multiple CPLB hits\n" \ + level " - More than one CPLB entry matches data fetch address.\n" +#define EXC_0x28(level) \ + "Program Sequencer Exception caused by an emulation watchpoint match\n" \ + level " - There is a watchpoint match, and one of the EMUSW\n" \ + level " bits in the Watchpoint Instruction Address Control register (WPIACTL) is set.\n" +#define EXC_0x2A(level) \ + "Instruction fetch misaligned address violation\n" \ + level " - Attempted misaligned instruction cache fetch. On a misaligned instruction fetch\n" \ + level " exception, the return address provided in RETX is the destination address which is\n" \ + level " misaligned, rather than the address of the offending instruction.\n" +#define EXC_0x2B(level) \ + "CPLB protection violation\n" \ + level " - Illegal instruction fetch access (memory protection violation).\n" +#define EXC_0x2C(level) \ + "Instruction fetch CPLB miss\n" \ + level " - CPLB miss on an instruction fetch.\n" +#define EXC_0x2D(level) \ + "Instruction fetch multiple CPLB hits\n" \ + level " - More than one CPLB entry matches instruction fetch address.\n" +#define EXC_0x2E(level) \ + "Illegal use of supervisor resource\n" \ + level " - Attempted to use a Supervisor register or instruction from User mode.\n" \ + level " Supervisor resources are registers and instructions that are reserved\n" \ + level " for Supervisor use: Supervisor only registers, all MMRs, and Supervisor\n" \ + level " only instructions.\n" #endif /* __ASSEMBLY__ */ #endif /* _BFIN_TRAPS_H */ -- cgit v1.2.3 From 49dce9124b41984bf1e918847bc17929c2e8f80f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 16:46:49 +0800 Subject: Blackfin arch: split apart dump_bfin_regs and merge/remove show_regs from process.c, which was largely duplicated Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- include/asm-blackfin/bfin-global.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 6ef501b35df..39bdd86871c 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h @@ -50,7 +50,8 @@ extern unsigned long get_sclk(void); extern unsigned long sclk_to_usecs(unsigned long sclk); extern unsigned long usecs_to_sclk(unsigned long usecs); -extern void dump_bfin_regs(struct pt_regs *fp, void *retaddr); +extern void dump_bfin_process(struct pt_regs *regs); +extern void dump_bfin_mem(void *retaddr); extern void dump_bfin_trace_buffer(void); extern int init_arch_irq(void); -- cgit v1.2.3 From 5fe4a33430d90243ff93a77ea31e20f7557bca8a Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 22 Nov 2007 19:38:25 +0800 Subject: [SUNRPC]: Make xprtsock.c:xs_setup_{udp,tcp}() static xs_setup_{udp,tcp}() can now become static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Herbert Xu --- include/linux/sunrpc/xprtsock.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include') diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h index 2c6c2c2783d..c2a46c45c8f 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h @@ -9,12 +9,6 @@ #ifdef __KERNEL__ -/* - * Socket transport setup operations - */ -struct rpc_xprt *xs_setup_udp(struct xprt_create *args); -struct rpc_xprt *xs_setup_tcp(struct xprt_create *args); - int init_socket_xprt(void); void cleanup_socket_xprt(void); -- cgit v1.2.3 From 218ad12f42e0b6207105cde8fd13017d1ed449e4 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Mon, 26 Nov 2007 20:23:31 +0800 Subject: [IPV4]: Fix memory leak in inet_hashtables.h when NUMA is on The inet_ehash_locks_alloc() looks like this: #ifdef CONFIG_NUMA if (size > PAGE_SIZE) x = vmalloc(...); else #endif x = kmalloc(...); Unlike it, the inet_ehash_locks_alloc() looks like this: #ifdef CONFIG_NUMA if (size > PAGE_SIZE) vfree(x); else #else kfree(x); #endif The error is obvious - if the NUMA is on and the size is less than the PAGE_SIZE we leak the pointer (kfree is inside the #else branch). Compiler doesn't warn us because after the kfree(x) there's a "x = NULL" assignment, so here's another (minor?) bug: we don't set x to NULL under certain circumstances. Boring explanation, I know... Patch explains it better. Signed-off-by: Pavel Emelyanov Signed-off-by: Herbert Xu --- include/net/inet_hashtables.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 469216d9366..37f6cb11212 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h @@ -186,9 +186,8 @@ static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo) if (size > PAGE_SIZE) vfree(hashinfo->ehash_locks); else -#else - kfree(hashinfo->ehash_locks); #endif + kfree(hashinfo->ehash_locks); hashinfo->ehash_locks = NULL; } } -- cgit v1.2.3 From a8929198563c48544cc0cee0565be7d6629a2a4e Mon Sep 17 00:00:00 2001 From: eric miao Date: Tue, 20 Nov 2007 01:34:04 +0100 Subject: [ARM] 4651/1: pxa: add PXA3xx specific IRQ definitions add missing IRQ_xxx definitions for PXA3xx Signed-off-by: eric miao Signed-off-by: Russell King --- include/asm-arm/arch-pxa/irqs.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index 6238dbf7a23..1c762078424 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h @@ -13,7 +13,7 @@ #define PXA_IRQ(x) (x) -#ifdef CONFIG_PXA27x +#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) #define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */ #define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */ #define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */ @@ -52,11 +52,26 @@ #define IRQ_RTC1Hz PXA_IRQ(30) /* RTC HZ Clock Tick */ #define IRQ_RTCAlrm PXA_IRQ(31) /* RTC Alarm */ -#ifdef CONFIG_PXA27x +#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) #define IRQ_TPM PXA_IRQ(32) /* TPM interrupt */ #define IRQ_CAMERA PXA_IRQ(33) /* Camera Interface */ #endif +#ifdef CONFIG_PXA3xx +#define IRQ_CIR PXA_IRQ(34) /* Consumer IR */ +#define IRQ_TSI PXA_IRQ(36) /* Touch Screen Interface (PXA320) */ +#define IRQ_USIM2 PXA_IRQ(38) /* USIM2 Controller */ +#define IRQ_GRPHICS PXA_IRQ(39) /* Graphics Controller */ +#define IRQ_MMC2 PXA_IRQ(41) /* MMC2 Controller */ +#define IRQ_1WIRE PXA_IRQ(44) /* 1-Wire Controller */ +#define IRQ_NAND PXA_IRQ(45) /* NAND Controller */ +#define IRQ_USB2 PXA_IRQ(46) /* USB 2.0 Device Controller */ +#define IRQ_WAKEUP0 PXA_IRQ(49) /* EXT_WAKEUP0 */ +#define IRQ_WAKEUP1 PXA_IRQ(50) /* EXT_WAKEUP1 */ +#define IRQ_DMEMC PXA_IRQ(51) /* Dynamic Memory Controller */ +#define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */ +#endif + #define PXA_GPIO_IRQ_BASE (64) #define PXA_GPIO_IRQ_NUM (128) -- cgit v1.2.3 From 43b35f104d20c03fd1741d25c370a94485e2cae6 Mon Sep 17 00:00:00 2001 From: eric miao Date: Tue, 20 Nov 2007 01:35:51 +0100 Subject: [ARM] 4653/1: pxa: fix a gpio typo in mfp-pxa320.h Signed-off-by: bridge wu Signed-off-by: eric miao Signed-off-by: Russell King --- include/asm-arm/arch-pxa/mfp-pxa320.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-arm/arch-pxa/mfp-pxa320.h b/include/asm-arm/arch-pxa/mfp-pxa320.h index 488a5bbc49e..52deedcaf3b 100644 --- a/include/asm-arm/arch-pxa/mfp-pxa320.h +++ b/include/asm-arm/arch-pxa/mfp-pxa320.h @@ -18,7 +18,7 @@ #include /* GPIO */ -#define GPIO46_GPIO MFP_CFG(GPIO6, AF0) +#define GPIO46_GPIO MFP_CFG(GPIO46, AF0) #define GPIO49_GPIO MFP_CFG(GPIO49, AF0) #define GPIO50_GPIO MFP_CFG(GPIO50, AF0) #define GPIO51_GPIO MFP_CFG(GPIO51, AF0) -- cgit v1.2.3 From 52b2bd7f97e2677f8d6f5cef675f86bba732e860 Mon Sep 17 00:00:00 2001 From: eric miao Date: Tue, 20 Nov 2007 01:36:44 +0100 Subject: [ARM] 4654/1: pxa: update default MFP register value 1. update default MFPR value to drive strength fast 3mA and edge detection logic disabled 2. update impacted MFP_CFG_xxx() macros Signed-off-by: bridge wu Signed-off-by: eric miao Signed-off-by: Russell King --- include/asm-arm/arch-pxa/mfp.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-pxa/mfp.h b/include/asm-arm/arch-pxa/mfp.h index ac4157af5a8..03c508d94f0 100644 --- a/include/asm-arm/arch-pxa/mfp.h +++ b/include/asm-arm/arch-pxa/mfp.h @@ -346,23 +346,31 @@ typedef uint32_t mfp_cfg_t; #define MFP_CFG_PIN(mfp_cfg) (((mfp_cfg) >> 16) & 0xffff) #define MFP_CFG_VAL(mfp_cfg) ((mfp_cfg) & 0xffff) -#define MFPR_DEFAULT (0x0000) +/* + * MFP register defaults to + * drive strength fast 3mA (010'b) + * edge detection logic disabled + * alternate function 0 + */ +#define MFPR_DEFAULT (0x0840) #define MFP_CFG(pin, af) \ ((MFP_PIN_##pin << 16) | MFPR_DEFAULT | (MFP_##af)) #define MFP_CFG_DRV(pin, af, drv) \ - ((MFP_PIN_##pin << 16) | MFPR_DEFAULT |\ + ((MFP_PIN_##pin << 16) | (MFPR_DEFAULT & ~MFPR_DRV_MASK) |\ ((MFP_##drv) << 10) | (MFP_##af)) #define MFP_CFG_LPM(pin, af, lpm) \ - ((MFP_PIN_##pin << 16) | MFPR_DEFAULT | (MFP_##af) |\ + ((MFP_PIN_##pin << 16) | (MFPR_DEFAULT & ~MFPR_LPM_MASK) |\ (((MFP_LPM_##lpm) & 0x3) << 7) |\ (((MFP_LPM_##lpm) & 0x4) << 12) |\ - (((MFP_LPM_##lpm) & 0x8) << 10)) + (((MFP_LPM_##lpm) & 0x8) << 10) |\ + (MFP_##af)) #define MFP_CFG_X(pin, af, drv, lpm) \ - ((MFP_PIN_##pin << 16) | MFPR_DEFAULT |\ + ((MFP_PIN_##pin << 16) |\ + (MFPR_DEFAULT & ~(MFPR_DRV_MASK | MFPR_LPM_MASK)) |\ ((MFP_##drv) << 10) | (MFP_##af) |\ (((MFP_LPM_##lpm) & 0x3) << 7) |\ (((MFP_LPM_##lpm) & 0x4) << 12) |\ -- cgit v1.2.3 From 2d4baff8da06f424a6fca10e26434c4926a7c3df Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Mon, 26 Nov 2007 23:11:19 +0800 Subject: [SKBUFF]: Free old skb properly in skb_morph The skb_morph function only freed the data part of the dst skb, but leaked the auxiliary data such as the netfilter fields. This patch fixes this by moving the relevant parts from __kfree_skb to skb_release_all and calling it in skb_morph. It also makes kfree_skbmem static since it's no longer called anywhere else and it now no longer does skb_release_data. Thanks to Yasuyuki KOZAKAI for finding this problem and posting a patch for it. Signed-off-by: Herbert Xu --- include/linux/skbuff.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 91140fe8c11..bddd50bd687 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -356,7 +356,6 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size, return __alloc_skb(size, priority, 1, -1); } -extern void kfree_skbmem(struct sk_buff *skb); extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); extern struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t priority); -- cgit v1.2.3 From cfb6f26035b17d5d280ce4a6ceb041438643ba63 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 15 Nov 2007 23:42:11 +0000 Subject: [MIPS] Fix pcspeaker build. Signed-off-by: Ralf Baechle --- include/asm-mips/8253pit.h | 10 ---------- include/asm-mips/i8253.h | 2 ++ 2 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 include/asm-mips/8253pit.h (limited to 'include') diff --git a/include/asm-mips/8253pit.h b/include/asm-mips/8253pit.h deleted file mode 100644 index 285f78488cc..00000000000 --- a/include/asm-mips/8253pit.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * 8253/8254 Programmable Interval Timer - */ - -#ifndef _8253PIT_H -#define _8253PIT_H - -#define PIT_TICK_RATE 1193182UL - -#endif diff --git a/include/asm-mips/i8253.h b/include/asm-mips/i8253.h index 032ca73f181..5dabc870b32 100644 --- a/include/asm-mips/i8253.h +++ b/include/asm-mips/i8253.h @@ -12,6 +12,8 @@ #define PIT_CH0 0x40 #define PIT_CH2 0x42 +#define PIT_TICK_RATE 1193182UL + extern spinlock_t i8253_lock; extern void setup_pit_timer(void); -- cgit v1.2.3 From 98ce472181e760a552314850c238b14bbf3f04ec Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 30 Oct 2007 15:43:44 +0000 Subject: [MIPS] IP32: More interrupt renumbering fixes. Signed-off-by: Ralf Baechle --- include/asm-mips/ip32/ip32_ints.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-mips/ip32/ip32_ints.h b/include/asm-mips/ip32/ip32_ints.h index ab5612f90f6..85bc5302bce 100644 --- a/include/asm-mips/ip32/ip32_ints.h +++ b/include/asm-mips/ip32/ip32_ints.h @@ -22,7 +22,7 @@ enum ip32_irq_no { * CPU interrupts are 0 ... 7 */ - CRIME_IRQ_BASE = MIPS_CPU_IRQ_BASE, + CRIME_IRQ_BASE = MIPS_CPU_IRQ_BASE + 8, /* * MACE -- cgit v1.2.3 From 07500b0d855b7f3f47ca263b21b6397d743d45d2 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 30 Oct 2007 17:25:26 +0000 Subject: [MIPS] Fix context DSP context / TLS pointer switching bug for new threads. A new born thread starts execution not in schedule but rather in ret_from_fork which results in it bypassing the part of the code to load a new context written in C which are the DSP context and the userlocal register which Linux uses for the TLS pointer. Frequently we were just getting away with this bug for a number of reasons: o Real world application scenarios are very unlikely to use clone or fork in blocks of DSP code. o Linux by default runs the child process right after the fork, so the child by luck will find all the right context in the DSP and userlocal registers. o So far the rdhwr instruction was emulated on all hardware so userlocal wasn't getting referenced at all and the emulation wasn't suffering from the issue since it gets it's value straight from the thread's thread_info. Fixed by moving the code to load the context from switch_to() to finish_arch_switch which will be called by newborn and old threads. Signed-off-by: Ralf Baechle --- include/asm-mips/system.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 90e4b403f53..1030562d6ea 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h @@ -68,11 +68,15 @@ do { \ if (cpu_has_dsp) \ __save_dsp(prev); \ (last) = resume(prev, next, task_thread_info(next)); \ +} while (0) + +#define finish_arch_switch(prev) \ +do { \ if (cpu_has_dsp) \ __restore_dsp(current); \ if (cpu_has_userlocal) \ - write_c0_userlocal(task_thread_info(current)->tp_value);\ -} while(0) + write_c0_userlocal(current_thread_info()->tp_value); \ +} while (0) static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) { -- cgit v1.2.3 From 0f67e90e1caea4a0a14d2c60102547bce29f7f08 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 20 Nov 2007 10:44:18 +0000 Subject: [MIPS] Fix possible hang in LL/SC futex loops. The LL / SC loops in __futex_atomic_op() have the usual fixups necessary for memory acccesses to userspace from kernel space installed: __asm__ __volatile__( " .set push \n" " .set noat \n" " .set mips3 \n" "1: ll %1, %4 # __futex_atomic_op \n" " .set mips0 \n" " " insn " \n" " .set mips3 \n" "2: sc $1, %2 \n" " beqz $1, 1b \n" __WEAK_LLSC_MB "3: \n" " .set pop \n" " .set mips0 \n" " .section .fixup,\"ax\" \n" "4: li %0, %6 \n" " j 2b \n" <----- " .previous \n" " .section __ex_table,\"a\" \n" " "__UA_ADDR "\t1b, 4b \n" " "__UA_ADDR "\t2b, 4b \n" " .previous \n" : "=r" (ret), "=&r" (oldval), "=R" (*uaddr) : "0" (0), "R" (*uaddr), "Jr" (oparg), "i" (-EFAULT) : "memory"); The branch at the end of the fixup code, it goes back to the SC instruction, no matter if the fault was first taken by the LL or SC instruction resulting in an endless loop which will only terminate if the address become valid again due to another thread setting up an accessible mapping and the CPU happens to execute the SC instruction successfully which due to the preceeding ERET instruction of the fault handler would only happen if UNPREDICTABLE instruction behaviour of the SC instruction without a preceeding LL happens to favor that outcome. But normally processes are nice, pass valid arguments and we were just getting away with this. Thanks to Kaz Kylheku for providing the original report and a test case. Signed-off-by: Ralf Baechle --- include/asm-mips/futex.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm-mips/futex.h b/include/asm-mips/futex.h index 3e7e30d4f41..17f082cfea8 100644 --- a/include/asm-mips/futex.h +++ b/include/asm-mips/futex.h @@ -35,7 +35,7 @@ " .set mips0 \n" \ " .section .fixup,\"ax\" \n" \ "4: li %0, %6 \n" \ - " j 2b \n" \ + " j 3b \n" \ " .previous \n" \ " .section __ex_table,\"a\" \n" \ " "__UA_ADDR "\t1b, 4b \n" \ @@ -61,7 +61,7 @@ " .set mips0 \n" \ " .section .fixup,\"ax\" \n" \ "4: li %0, %6 \n" \ - " j 2b \n" \ + " j 3b \n" \ " .previous \n" \ " .section __ex_table,\"a\" \n" \ " "__UA_ADDR "\t1b, 4b \n" \ @@ -200,4 +200,4 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) } #endif -#endif +#endif /* _ASM_FUTEX_H */ -- cgit v1.2.3 From 5aa85c9fc49a6ce44dc10a42e2011bbde9dc445a Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 21 Nov 2007 16:39:44 +0000 Subject: [MIPS] Handle R4000/R4400 mfc0 from count register. The R4000 and R4400 have an errata where if the cp0 count register is read in the exact moment when it matches the compare register no interrupt will be generated. This bug may be triggered if the cp0 count register is being used as clocksource and the compare interrupt as clockevent. So a simple workaround is to avoid using the compare for both facilities on the affected CPUs. This is different from the workaround suggested in the old errata documents; at some opportunity probably the official version should be implemented and tested. Another thing to find out is which processor versions exactly are affected. I only have errata documents upto R4400 V3.0 available so for the moment the code treats all R4000 and R4400 as broken. This is potencially a problem for some machines that have no other decent clocksource available; this workaround will cause them to fall back to another clocksource, worst case the "jiffies" source. --- include/asm-mips/time.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h index ee1663e64da..1922494a0d9 100644 --- a/include/asm-mips/time.h +++ b/include/asm-mips/time.h @@ -58,11 +58,12 @@ extern int (*perf_irq)(void); * Initialize the calling CPU's compare interrupt as clockevent device */ #ifdef CONFIG_CEVT_R4K -extern void mips_clockevent_init(void); +extern int mips_clockevent_init(void); extern unsigned int __weak get_c0_compare_int(void); #else -static inline void mips_clockevent_init(void) +static inline int mips_clockevent_init(void) { + return -ENXIO; } #endif -- cgit v1.2.3 From 940f6b48a130e0a33cb8bd397dd0e277166470ad Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 24 Nov 2007 22:33:28 +0000 Subject: [MIPS] Only build r4k clocksource for systems that work ok with it. In particular as-is it's not suited for multicore and mutiprocessors systems where there is on guarantee that the counter are synchronized or running from the same clock at all. This broke Sibyte and probably others since the "[MIPS] Handle R4000/R4400 mfc0 from count register." commit. Signed-off-by: Ralf Baechle --- include/asm-mips/time.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h index 1922494a0d9..7717934f94c 100644 --- a/include/asm-mips/time.h +++ b/include/asm-mips/time.h @@ -67,6 +67,17 @@ static inline int mips_clockevent_init(void) } #endif +/* + * Initialize the count register as a clocksource + */ +#ifdef CONFIG_CEVT_R4K +extern void init_mips_clocksource(void); +#else +static inline void init_mips_clocksource(void) +{ +} +#endif + extern void clocksource_set_clock(struct clocksource *cs, unsigned int clock); extern void clockevent_set_clock(struct clock_event_device *cd, unsigned int clock); -- cgit v1.2.3 From cce335ae47e231398269fb05fa48e0e9cbf289e0 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 3 Nov 2007 02:05:43 +0000 Subject: [MIPS] 64-bit Sibyte kernels need DMA32. Sibyte SOCs only have 32-bit PCI. Due to the sparse use of the address space only the first 1GB of memory is mapped at physical addresses below 1GB. If a system has more than 1GB of memory 32-bit DMA will not be able to reach all of it. For now this patch is good enough to keep Sibyte users happy but it seems eventually something like swiotlb will be needed for Sibyte. Signed-off-by: Ralf Baechle --- include/asm-mips/dma.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h index 833437d31ef..d6a6c21f16d 100644 --- a/include/asm-mips/dma.h +++ b/include/asm-mips/dma.h @@ -92,6 +92,7 @@ #define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000) #endif #define MAX_DMA_PFN PFN_DOWN(virt_to_phys((void *)MAX_DMA_ADDRESS)) +#define MAX_DMA32_PFN (1UL << (32 - PAGE_SHIFT)) /* 8237 DMA controllers */ #define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ -- cgit v1.2.3 From f230d3f53d72d05bcb5666ab7e2eccd49c8b3a15 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Mon, 19 Nov 2007 13:47:20 +0100 Subject: [ARM] 4650/1: AT91: New-style init of I2C, support for i2c-gpio The AT91 I2C driver is currently marked as "broken" due to hardware issues. This patch enables AT91-based platforms to also use the bitbanged GPIO for I2C. This updates platform setup logic (setting up an i2c-gpio device using the same pins as the i2c-at91 device, unless only the BROKEN driver is enabled). Also make use of the new-style initialization of I2C devices using i2c_register_board_info(). Signed-off-by: David Brownell Signed-off-by: Andrew Victor Signed-off-by: Russell King --- include/asm-arm/arch-at91/board.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h index c0d7075982c..79054965baa 100644 --- a/include/asm-arm/arch-at91/board.h +++ b/include/asm-arm/arch-at91/board.h @@ -33,6 +33,7 @@ #include #include +#include #include /* USB Device */ @@ -94,7 +95,7 @@ struct at91_nand_data { extern void __init at91_add_device_nand(struct at91_nand_data *data); /* I2C*/ -extern void __init at91_add_device_i2c(void); +extern void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices); /* SPI */ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices); -- cgit v1.2.3 From c1c306344669ca40255e36192b101060ffbb1271 Mon Sep 17 00:00:00 2001 From: Alexey Starikovskiy Date: Mon, 26 Nov 2007 20:42:19 +0100 Subject: ACPI: Set max_cstate to 1 for early Opterons. AMD Opteron processors before CG revision don't like C-states > 1. This solves the long standing bugzilla #5303 and probably some more on affected machines: http://bugzilla.kernel.org/show_bug.cgi?id=5303 [ tglx@linutronix.de: reworked the patch so it does not wreck ia64 ] Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- include/asm-ia64/acpi.h | 1 + include/asm-x86/acpi.h | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) (limited to 'include') diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index 49730ffbbae..81bcd5e5178 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h @@ -94,6 +94,7 @@ ia64_acpi_release_global_lock (unsigned int *lock) #define acpi_noirq 0 /* ACPI always enabled on IA64 */ #define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */ #define acpi_strict 1 /* no ACPI spec workarounds on IA64 */ +#define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */ static inline void disable_acpi(void) { } const char *acpi_get_sysname (void); diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h index 0693689d414..f8a89793ac8 100644 --- a/include/asm-x86/acpi.h +++ b/include/asm-x86/acpi.h @@ -1,5 +1,32 @@ +#ifndef _ASM_X86_ACPI_H +#define _ASM_X86_ACPI_H + #ifdef CONFIG_X86_32 # include "acpi_32.h" #else # include "acpi_64.h" #endif + +#include + +/* + * Check if the CPU can handle C2 and deeper + */ +static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate) +{ + /* + * Early models (<=5) of AMD Opterons are not supposed to go into + * C2 state. + * + * Steppings 0x0A and later are good + */ + if (boot_cpu_data.x86 == 0x0F && + boot_cpu_data.x86_vendor == X86_VENDOR_AMD && + boot_cpu_data.x86_model <= 0x05 && + boot_cpu_data.x86_mask < 0x0A) + return 1; + else + return max_cstate; +} + +#endif -- cgit v1.2.3 From aafab10d3f6b68150ec9fe75b1462764fd45b728 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 26 Nov 2007 20:42:19 +0100 Subject: x86: fix ACPI compile for LOCAL_APIC=n ACPI processor idle code references local_apic_timer_c2_ok, which is not available when LOCAL_APIC is disabled. Define local_apic_timer_c2_ok as a constant, when LOCAL_APIC=n Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- include/asm-x86/apic_32.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-x86/apic_32.h b/include/asm-x86/apic_32.h index 4091b33dcb1..be158b27d54 100644 --- a/include/asm-x86/apic_32.h +++ b/include/asm-x86/apic_32.h @@ -120,6 +120,7 @@ extern int local_apic_timer_disabled; #else /* !CONFIG_X86_LOCAL_APIC */ static inline void lapic_shutdown(void) { } +#define local_apic_timer_c2_ok 1 #endif /* !CONFIG_X86_LOCAL_APIC */ -- cgit v1.2.3 From 52bfb36050c8529d9031d2c2513b281a360922ec Mon Sep 17 00:00:00 2001 From: John Stultz Date: Mon, 26 Nov 2007 20:42:19 +0100 Subject: time: add ADJ_OFFSET_SS_READ Michael Kerrisk reported that a long standing bug in the adjtimex() system call causes glibc's adjtime(3) function to deliver the wrong results if 'delta' is NULL. add the ADJ_OFFSET_SS_READ API detail, which will be used by glibc to fix this API compatibility bug. Also see: http://bugzilla.kernel.org/show_bug.cgi?id=6761 [ mingo@elte.hu: added patch description and made it backwards compatible ] NOTE: the new flag is defined 0xa001 so that it returns -EINVAL on older kernels - this way glibc can use it safely. Suggested by Ulrich Drepper. Acked-by: Ulrich Drepper Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- include/linux/timex.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/timex.h b/include/linux/timex.h index 37ac3ff90fa..24c6a2b5951 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -137,6 +137,7 @@ struct timex { #define ADJ_TIMECONST 0x0020 /* pll time constant */ #define ADJ_TICK 0x4000 /* tick value */ #define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ +#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ /* xntp 3.4 compatibility names */ #define MOD_OFFSET ADJ_OFFSET -- cgit v1.2.3 From 58e1010da3c15e7bdf426b0a3d4b13dba1b7d055 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 26 Nov 2007 21:21:49 +0100 Subject: sched: fix RLIMIT_CPU comment Devan Lippman noticed that the RLIMIT_CPU comment in resource.h is incorrect: the field is in seconds, not msecs. We used msecs in earlier versions of the patch but that got changed. Found-by: Devan Lippman Signed-off-by: Ingo Molnar --- include/asm-generic/resource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-generic/resource.h b/include/asm-generic/resource.h index cfe3692b23e..a4a22cc3589 100644 --- a/include/asm-generic/resource.h +++ b/include/asm-generic/resource.h @@ -12,7 +12,7 @@ * then it defines them prior including asm-generic/resource.h. ) */ -#define RLIMIT_CPU 0 /* CPU time in ms */ +#define RLIMIT_CPU 0 /* CPU time in sec */ #define RLIMIT_FSIZE 1 /* Maximum filesize */ #define RLIMIT_DATA 2 /* max data size */ #define RLIMIT_STACK 3 /* max stack size */ -- cgit v1.2.3 From cfcb43ff7ce28f347a39e1a7519e01850b588718 Mon Sep 17 00:00:00 2001 From: James Lentini Date: Mon, 26 Nov 2007 12:42:44 -0500 Subject: SUNRPC: remove NFS/RDMA client's binary sysctls Support for binary sysctls is being deprecated in 2.6.24. Since there are no applications using the NFS/RDMA client's binary sysctls, it makes sense to remove them. The patch below does this while leaving the /proc/sys interface unchanged. Please consider this for 2.6.24. Signed-off-by: James Lentini Signed-off-by: Trond Myklebust --- include/linux/sunrpc/debug.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index 3347c72b848..3912cf16361 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h @@ -88,11 +88,6 @@ enum { CTL_SLOTTABLE_TCP, CTL_MIN_RESVPORT, CTL_MAX_RESVPORT, - CTL_SLOTTABLE_RDMA, - CTL_RDMA_MAXINLINEREAD, - CTL_RDMA_MAXINLINEWRITE, - CTL_RDMA_WRITEPADDING, - CTL_RDMA_MEMREG, }; #endif /* _LINUX_SUNRPC_DEBUG_H_ */ -- cgit v1.2.3 From 5334eb13d455dd26b7064980b118e3c957929701 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 21 Nov 2007 15:04:31 -0800 Subject: NFS: make nfs_wb_page_priority() static nfs_wb_page_priority() can now become static. Signed-off-by: Adrian Bunk Cc: Trond Myklebust Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Trond Myklebust --- include/linux/nfs_fs.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index e82a6ebc725..2d15d4aac09 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -422,7 +422,6 @@ extern long nfs_sync_mapping_wait(struct address_space *, struct writeback_contr extern int nfs_wb_all(struct inode *inode); extern int nfs_wb_nocommit(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); -- cgit v1.2.3 From 483066d62ec583fb6379377a9bfa8d5645b91c75 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 24 Oct 2007 18:24:02 +0200 Subject: SUNRPC: make sunrpc/xprtsock.c:xs_setup_{udp,tcp}() static xs_setup_{udp,tcp}() can now become static. Signed-off-by: Adrian Bunk Signed-off-by: Trond Myklebust --- include/linux/sunrpc/xprtsock.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include') diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h index 2c6c2c2783d..c2a46c45c8f 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h @@ -9,12 +9,6 @@ #ifdef __KERNEL__ -/* - * Socket transport setup operations - */ -struct rpc_xprt *xs_setup_udp(struct xprt_create *args); -struct rpc_xprt *xs_setup_tcp(struct xprt_create *args); - int init_socket_xprt(void); void cleanup_socket_xprt(void); -- cgit v1.2.3 From c23f1f9c40647971e673b5454c22c76b9ae9c5f5 Mon Sep 17 00:00:00 2001 From: Aristeu Rozanski Date: Tue, 27 Nov 2007 00:46:57 -0500 Subject: Input: add definitions for frame forward and frame back keys Signed-off-by: Aristeu Rozanski Signed-off-by: Dmitry Torokhov --- include/linux/input.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/input.h b/include/linux/input.h index b45f240a8c4..1c0738111a7 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -530,6 +530,9 @@ struct input_absinfo { #define KEY_DOLLAR 0x1b2 #define KEY_EURO 0x1b3 +#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ +#define KEY_FRAMEFORWARD 0x1b5 + #define KEY_DEL_EOL 0x1c0 #define KEY_DEL_EOS 0x1c1 #define KEY_INS_LINE 0x1c2 -- cgit v1.2.3 From 35baef2afb6270ff731b4d766f0b163c3912304f Mon Sep 17 00:00:00 2001 From: Aristeu Rozanski Date: Tue, 27 Nov 2007 00:47:04 -0500 Subject: Input: adds the context menu key (HUT GenDesc 0x84) Signed-off-by: Aristeu Rozanski Signed-off-by: Dmitry Torokhov --- include/linux/input.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/input.h b/include/linux/input.h index 1c0738111a7..2075d6da2a3 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -533,6 +533,8 @@ struct input_absinfo { #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ #define KEY_FRAMEFORWARD 0x1b5 +#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ + #define KEY_DEL_EOL 0x1c0 #define KEY_DEL_EOS 0x1c1 #define KEY_INS_LINE 0x1c2 -- cgit v1.2.3 From 645a8d94629fd812a220d54876339a1ddafd9bc2 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 27 Nov 2007 09:30:39 +0100 Subject: scatterlist: add more safeguards Add more safeguards to protect against misinterpreting a chain entry as a normal scatterlist and vice-versa. * Make sure the entry isn't a chain when assigning and reading a normal sg. * Clear offset and length when chaining. Signed-off-by: Tejun Heo Signed-off-by: Jens Axboe --- include/linux/scatterlist.h | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 25973504414..416e000dfe8 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h @@ -26,6 +26,16 @@ #define SG_MAGIC 0x87654321 +/* + * We overload the LSB of the page pointer to indicate whether it's + * a valid sg entry, or whether it points to the start of a new scatterlist. + * Those low bits are there for everyone! (thanks mason :-) + */ +#define sg_is_chain(sg) ((sg)->page_link & 0x01) +#define sg_is_last(sg) ((sg)->page_link & 0x02) +#define sg_chain_ptr(sg) \ + ((struct scatterlist *) ((sg)->page_link & ~0x03)) + /** * sg_assign_page - Assign a given page to an SG entry * @sg: SG entry @@ -47,6 +57,7 @@ static inline void sg_assign_page(struct scatterlist *sg, struct page *page) BUG_ON((unsigned long) page & 0x03); #ifdef CONFIG_DEBUG_SG BUG_ON(sg->sg_magic != SG_MAGIC); + BUG_ON(sg_is_chain(sg)); #endif sg->page_link = page_link | (unsigned long) page; } @@ -73,7 +84,14 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page, sg->length = len; } -#define sg_page(sg) ((struct page *) ((sg)->page_link & ~0x3)) +static inline struct page *sg_page(struct scatterlist *sg) +{ +#ifdef CONFIG_DEBUG_SG + BUG_ON(sg->sg_magic != SG_MAGIC); + BUG_ON(sg_is_chain(sg)); +#endif + return (struct page *)((sg)->page_link & ~0x3); +} /** * sg_set_buf - Set sg entry to point at given data @@ -88,16 +106,6 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf, sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); } -/* - * We overload the LSB of the page pointer to indicate whether it's - * a valid sg entry, or whether it points to the start of a new scatterlist. - * Those low bits are there for everyone! (thanks mason :-) - */ -#define sg_is_chain(sg) ((sg)->page_link & 0x01) -#define sg_is_last(sg) ((sg)->page_link & 0x02) -#define sg_chain_ptr(sg) \ - ((struct scatterlist *) ((sg)->page_link & ~0x03)) - /** * sg_next - return the next scatterlist entry in a list * @sg: The current sg entry @@ -179,6 +187,13 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, #ifndef ARCH_HAS_SG_CHAIN BUG(); #endif + + /* + * offset and length are unused for chain entry. Clear them. + */ + prv->offset = 0; + prv->length = 0; + /* * Set lowest bit to indicate a link pointer, and make sure to clear * the termination bit if it happens to be set. -- cgit v1.2.3 From 59ce3df3e107f80c5c849f06bb9da149b1ceb349 Mon Sep 17 00:00:00 2001 From: Hirokazu Takata Date: Wed, 12 Sep 2007 17:46:53 +0900 Subject: m32r: Add missing syscalls Add the following 39 syscalls for m32r: sys_add_key, sys_request_key, sys_keyctl, sys_ioprio_set, sys_ioprio_get, sys_inotify_init, sys_inotify_add_watch, sys_inotify_rm_watch, sys_migrate_pages, sys_openat, sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64, sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat, sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare, sys_set_robust_list, sys_get_robust_list, sys_splice, sys_sync_file_range, sys_tee, sys_vmsplice, sys_move_pages, sys_getcpu, sys_epoll_pwait, sys_utimensat, sys_signalfd, sys_timerfd, sys_eventfd, sys_fallocate Signed-off-by: Hirokazu Takata --- include/asm-m32r/unistd.h | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index cbbd53762ea..d202aa9abdd 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h @@ -290,10 +290,50 @@ #define __NR_mq_getsetattr (__NR_mq_open+5) #define __NR_kexec_load 283 #define __NR_waitid 284 +/* 285 is unused */ +#define __NR_add_key 286 +#define __NR_request_key 287 +#define __NR_keyctl 288 +#define __NR_ioprio_set 289 +#define __NR_ioprio_get 290 +#define __NR_inotify_init 291 +#define __NR_inotify_add_watch 292 +#define __NR_inotify_rm_watch 293 +#define __NR_migrate_pages 294 +#define __NR_openat 295 +#define __NR_mkdirat 296 +#define __NR_mknodat 297 +#define __NR_fchownat 298 +#define __NR_futimesat 299 +#define __NR_fstatat64 300 +#define __NR_unlinkat 301 +#define __NR_renameat 302 +#define __NR_linkat 303 +#define __NR_symlinkat 304 +#define __NR_readlinkat 305 +#define __NR_fchmodat 306 +#define __NR_faccessat 307 +#define __NR_pselect6 308 +#define __NR_ppoll 309 +#define __NR_unshare 310 +#define __NR_set_robust_list 311 +#define __NR_get_robust_list 312 +#define __NR_splice 313 +#define __NR_sync_file_range 314 +#define __NR_tee 315 +#define __NR_vmsplice 316 +#define __NR_move_pages 317 +#define __NR_getcpu 318 +#define __NR_epoll_pwait 319 +#define __NR_utimensat 320 +#define __NR_signalfd 321 +#define __NR_timerfd 322 +#define __NR_eventfd 323 +#define __NR_fallocate 324 #ifdef __KERNEL__ -#define NR_syscalls 285 +#define NR_syscalls 325 #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_STAT64 -- cgit v1.2.3 From 52fda4870e74b43fa5ef5171cc89ac40e5b53ed1 Mon Sep 17 00:00:00 2001 From: Hirokazu Takata Date: Thu, 13 Sep 2007 18:31:34 +0900 Subject: m32r: Ignore warnings for unused syscalls checksyscalls.sh reports warnings for missing syscalls. But, on m32r, some legacy syscalls were removed elaborately. This patch kills warnings for obsolete syscalls, which are no longer used in the m32r kernel. Signed-off-by: Hirokazu Takata --- include/asm-m32r/unistd.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include') diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index d202aa9abdd..f467eac9ba7 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h @@ -351,6 +351,30 @@ #define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SYS_RT_SIGACTION +#define __IGNORE_lchown +#define __IGNORE_setuid +#define __IGNORE_getuid +#define __IGNORE_setgid +#define __IGNORE_getgid +#define __IGNORE_geteuid +#define __IGNORE_getegid +#define __IGNORE_fcntl +#define __IGNORE_setreuid +#define __IGNORE_setregid +#define __IGNORE_getrlimit +#define __IGNORE_getgroups +#define __IGNORE_setgroups +#define __IGNORE_select +#define __IGNORE_mmap +#define __IGNORE_fchown +#define __IGNORE_setfsuid +#define __IGNORE_setfsgid +#define __IGNORE_setresuid +#define __IGNORE_getresuid +#define __IGNORE_setresgid +#define __IGNORE_getresgid +#define __IGNORE_chown + /* * "Conditional" syscalls * -- cgit v1.2.3 From c37a33035720a0faf1f609dc7c2c07080ed83629 Mon Sep 17 00:00:00 2001 From: Hirokazu Takata Date: Wed, 12 Sep 2007 17:51:35 +0900 Subject: m32r: Update sys_rt_sigsuspend Update sys_rt_sigsuspend() of arch/m32r/signal.c. This modification is derived from generic one of kernel/signal.c. Signed-off-by: Hirokazu Takata --- include/asm-m32r/thread_info.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm-m32r/thread_info.h b/include/asm-m32r/thread_info.h index c039820dba7..1effcd0f5e6 100644 --- a/include/asm-m32r/thread_info.h +++ b/include/asm-m32r/thread_info.h @@ -149,16 +149,21 @@ static inline unsigned int get_thread_fault_code(void) #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ #define TIF_IRET 4 /* return with iret */ -#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ - /* 31..28 fault code */ -#define TIF_MEMDIE 17 +#define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal() */ +#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ +#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ +#define TIF_MEMDIE 18 /* OOM killer killed process */ +#define TIF_FREEZE 19 /* is freezing for suspend */ #define _TIF_SYSCALL_TRACE (1< Date: Wed, 28 Nov 2007 15:52:56 +0100 Subject: sched: clean up, move __sched_text_start/end to sched.h move __sched_text_start/end to sched.h. No code changed: text data bss dec hex filename 26582 2310 28 28920 70f8 sched.o.before 26582 2310 28 28920 70f8 sched.o.after Signed-off-by: Ingo Molnar --- include/linux/sched.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/sched.h b/include/linux/sched.h index ee800e7a70d..ac3d496fbd2 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -282,6 +282,10 @@ static inline void touch_all_softlockup_watchdogs(void) /* Attach to any functions which should be ignored in wchan output. */ #define __sched __attribute__((__section__(".sched.text"))) + +/* Linker adds these: start and end of __sched functions */ +extern char __sched_text_start[], __sched_text_end[]; + /* Is this address in the __sched functions? */ extern int in_sched_functions(unsigned long addr); -- cgit v1.2.3 From bc59462b80c694670fbb5d0bb1a8450ffc353080 Mon Sep 17 00:00:00 2001 From: Phil Endecott Date: Mon, 29 Oct 2007 20:40:30 +0000 Subject: USB: Fix signr comment in usbdevice_fs.h This trivial documentation patch corrects a comment in usbdevice_fs.h; it previously suggested that the signal would only be sent on error, but I am told that it is sent on both successful and unsuccessful completion, and that zero indicates that no signal should be sent. Signed-off-by: Phil Endecott Signed-off-by: Greg Kroah-Hartman --- include/linux/usbdevice_fs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index 342dd5a7e8b..8ca5a7fbc9e 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h @@ -102,7 +102,8 @@ struct usbdevfs_urb { int start_frame; int number_of_packets; int error_count; - unsigned int signr; /* signal to be sent on error, -1 if none should be sent */ + unsigned int signr; /* signal to be sent on completion, + or 0 if none should be sent. */ void *usercontext; struct usbdevfs_iso_packet_desc iso_frame_desc[0]; }; -- cgit v1.2.3 From 7e61559f6199bb387037abfc7d10a893973561fc Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Tue, 6 Nov 2007 11:43:42 -0500 Subject: USB: keep track of whether interface sysfs files exist This patch (as1009) solves the problem of multiple registrations for USB sysfs files in a more satisfying way than the existing code. It simply adds a flag to keep track of whether or not the files have been created; that way the files can be created or removed as needed. Signed-off-by: Alan Stern --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/usb.h b/include/linux/usb.h index c5c8f169d3c..416ee7617d9 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -157,6 +157,7 @@ struct usb_interface { * bound to */ enum usb_interface_condition condition; /* state of binding */ unsigned is_active:1; /* the interface is not suspended */ + unsigned sysfs_files_created:1; /* the sysfs attributes exist */ unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ struct device dev; /* interface specific device info */ -- cgit v1.2.3 From a7839e960675b549f06209d18283d5cee2ce9261 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Wed, 28 Nov 2007 16:21:21 -0800 Subject: PNP: increase the maximum number of resources On some systems the number of resources(IO,MEM) returnedy by PNP device is greater than the PNP constant, for example motherboard devices. It brings that some resources can't be reserved and resource confilicts. This will cause PCI resources are assigned wrongly in some systems, and cause hang. This is a regression since we deleted ACPI motherboard driver and use PNP system driver. [akpm@linux-foundation.org: fix text and coding-style a bit] Signed-off-by: Li Shaohua Signed-off-by: Zhao Yakui Cc: Bjorn Helgaas Cc: Thomas Renninger Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/pnp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 664d68cb1fb..0a0426c2867 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -13,8 +13,8 @@ #include #include -#define PNP_MAX_PORT 8 -#define PNP_MAX_MEM 4 +#define PNP_MAX_PORT 24 +#define PNP_MAX_MEM 12 #define PNP_MAX_IRQ 2 #define PNP_MAX_DMA 2 #define PNP_NAME_LEN 50 -- cgit v1.2.3 From 75d427982fef672b3608ae809b8819ec6358edfe Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 28 Nov 2007 16:21:30 -0800 Subject: spi: S3C2410: add bus number to SPI GPIO driver Allow passing a bus number through the platform data for the S3C2410 SPI GPIO driver. This is needed to support multiple SPI busses. Signed-off-by: Ben Dooks Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-arm/arch-s3c2410/spi-gpio.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/asm-arm/arch-s3c2410/spi-gpio.h b/include/asm-arm/arch-s3c2410/spi-gpio.h index c1e4db7c971..ba1dca88d48 100644 --- a/include/asm-arm/arch-s3c2410/spi-gpio.h +++ b/include/asm-arm/arch-s3c2410/spi-gpio.h @@ -21,6 +21,8 @@ struct s3c2410_spigpio_info { unsigned long pin_mosi; unsigned long pin_miso; + int bus_num; + unsigned long board_size; struct spi_board_info *board_info; -- cgit v1.2.3 From 79288f5e935cb445220eef83f3f793159555f9ae Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 28 Nov 2007 16:21:32 -0800 Subject: Fix usage in userspace For reasons unclear to me, glibc's deliberately defeats the attempt we make in to include For now, change the one instance of __u32 to 'unsigned int' instead because it's breaking userspace. We should probably also remove our inclusion of , since we don't use it -- but that's not a change to make in -rc. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Woodhouse Cc: Samuel Thibault Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/kd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/kd.h b/include/linux/kd.h index c91fc0c9c49..15f2853ea58 100644 --- a/include/linux/kd.h +++ b/include/linux/kd.h @@ -126,7 +126,7 @@ struct kbdiacrs { #define KDSKBDIACR 0x4B4B /* write kernel accent table */ struct kbdiacruc { - __u32 diacr, base, result; + unsigned int diacr, base, result; }; struct kbdiacrsuc { unsigned int kb_cnt; /* number of entries in following array */ -- cgit v1.2.3 From 68576cf122bc5195c758ed295e78b5858472378a Mon Sep 17 00:00:00 2001 From: Thomas Bogendoerfer Date: Wed, 28 Nov 2007 16:21:44 -0800 Subject: IP22ZILOG: fix lockup and sysrq - fix lockup when switching from early console to real console - make sysrq reliable - fix panic, if sysrq is issued before console is opened Signed-off-by: Thomas Bogendoerfer Acked-by: Ralf Baechle Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-mips/system.h | 2 -- include/linux/serial_core.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 1030562d6ea..a944eda4faf 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h @@ -209,8 +209,6 @@ extern void *set_except_vector(int n, void *addr); extern unsigned long ebase; extern void per_cpu_trap_init(void); -extern int stop_a_enabled; - /* * See include/asm-ia64/system.h; prevents deadlock on SMP * systems. diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 6a5203fb9cf..9963f81fea9 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -437,7 +437,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) #ifdef SUPPORT_SYSRQ if (port->sysrq) { if (ch && time_before(jiffies, port->sysrq)) { - handle_sysrq(ch, port->info->tty); + handle_sysrq(ch, port->info ? port->info->tty : NULL); port->sysrq = 0; return 1; } -- cgit v1.2.3 From 6454d1f9038f708d7deef6270ed4ba5bb6e55869 Mon Sep 17 00:00:00 2001 From: Tobias Poschwatta Date: Wed, 28 Nov 2007 16:21:45 -0800 Subject: fix up ext2_fs.h for userspace after reservations backport In commit a686cd898bd999fd026a51e90fb0a3410d258ddb: "Val's cross-port of the ext3 reservations code into ext2." include/linux/ext2_fs.h got a new function whose return value is only defined if __KERNEL__ is defined. Putting #ifdef __KERNEL__ around the function seems to help, patch below. Signed-off-by: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ext2_fs.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 0f6c86c634f..84cec2aa9f1 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h @@ -563,11 +563,4 @@ enum { ~EXT2_DIR_ROUND) #define EXT2_MAX_REC_LEN ((1<<16)-1) -static inline ext2_fsblk_t -ext2_group_first_block_no(struct super_block *sb, unsigned long group_no) -{ - return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) + - le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block); -} - #endif /* _LINUX_EXT2_FS_H */ -- cgit v1.2.3 From 7c83172b98e569d9aabf947d8b3b089dadb2ff46 Mon Sep 17 00:00:00 2001 From: "Huang, Ying" Date: Wed, 28 Nov 2007 16:21:55 -0800 Subject: x86_64 EFI boot support: EFI frame buffer driver This patch adds Graphics Output Protocol support to the kernel. UEFI2.0 spec deprecates Universal Graphics Adapter (UGA) protocol and only Graphics Output Protocol (GOP) is produced. Therefore, the boot loader needs to query the UEFI firmware with appropriate Output Protocol and pass the video information to the kernel. As a result of GOP protocol, an EFI framebuffer driver is needed for displaying console messages. The patch adds a EFI framebuffer driver. The EFI frame buffer driver in this patch is based on the Intel Mac framebuffer driver. The ELILO bootloader takes care of passing the video information as appropriate for EFI firmware. The framebuffer driver has been tested in i386 kernel and x86_64 kernel on EFI platform. Signed-off-by: Chandramouli Narayanan Signed-off-by: Huang Ying Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andi Kleen Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/screen_info.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index 827b85bbf38..1ee2c05142f 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h @@ -63,6 +63,8 @@ struct screen_info { #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ +#define VIDEO_TYPE_EFI 0x70 /* EFI graphic mode */ + #ifdef __KERNEL__ extern struct screen_info screen_info; -- cgit v1.2.3 From a6643094e73247c1ebd36816f494f631fa7be348 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 28 Nov 2007 16:22:00 -0800 Subject: fuse: pass open flags to read and write Some open flags (O_APPEND, O_DIRECT) can be changed with fcntl(F_SETFL, ...) after open, but fuse currently only sends the flags to userspace in open. To make it possible to correcly handle changing flags, send the current value to userspace in each read and write. Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/fuse.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/linux/fuse.h b/include/linux/fuse.h index d0c437028c8..5c86f1196c3 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h @@ -16,6 +16,7 @@ * - add lk_flags in fuse_lk_in * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in * - add blksize field to fuse_attr + * - add file flags field to fuse_read_in and fuse_write_in */ #include @@ -280,6 +281,8 @@ struct fuse_read_in { __u32 size; __u32 read_flags; __u64 lock_owner; + __u32 flags; + __u32 padding; }; #define FUSE_COMPAT_WRITE_IN_SIZE 24 @@ -290,6 +293,8 @@ struct fuse_write_in { __u32 size; __u32 write_flags; __u64 lock_owner; + __u32 flags; + __u32 padding; }; struct fuse_write_out { -- cgit v1.2.3 From 8853c202b4a91713dbfb4d9b6e1c87cc2aa12392 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Wed, 28 Nov 2007 16:22:03 -0800 Subject: RTC: convert mutex to bitfield RTC code is using mutex to assure exclusive access to /dev/rtc. This is however wrong usage, as it leaves the mutex locked when returning into userspace, which is unacceptable. Convert rtc->char_lock into bit operation. Signed-off-by: Jiri Kosina Acked-by: Alessandro Zummo Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/rtc.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 6d5e4a46781..f2d0d152772 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -133,6 +133,9 @@ struct rtc_class_ops { #define RTC_DEVICE_NAME_SIZE 20 struct rtc_task; +/* flags */ +#define RTC_DEV_BUSY 0 + struct rtc_device { struct device dev; @@ -145,7 +148,7 @@ struct rtc_device struct mutex ops_lock; struct cdev char_dev; - struct mutex char_lock; + unsigned long flags; unsigned long irq_data; spinlock_t irq_lock; -- cgit v1.2.3 From 7267d1ccdb5ef08289323461db3551570fa1ab27 Mon Sep 17 00:00:00 2001 From: eric miao Date: Tue, 27 Nov 2007 03:12:19 +0100 Subject: [ARM] 4672/1: pxa: fix DRCMR(n) to support PXA27x and later processors Signed-off-by: eric miao Signed-off-by: Russell King --- include/asm-arm/arch-pxa/pxa-regs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index bb68b598c43..6b33df6f199 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h @@ -110,7 +110,10 @@ #define DALGN __REG(0x400000a0) /* DMA Alignment Register */ #define DINT __REG(0x400000f0) /* DMA Interrupt Register */ -#define DRCMR(n) __REG2(0x40000100, (n)<<2) +#define DRCMR(n) (*(((n) < 64) ? \ + &__REG2(0x40000100, ((n) & 0x3f) << 2) : \ + &__REG2(0x40001100, ((n) & 0x3f) << 2))) + #define DRCMR0 __REG(0x40000100) /* Request to Channel Map Register for DREQ 0 */ #define DRCMR1 __REG(0x40000104) /* Request to Channel Map Register for DREQ 1 */ #define DRCMR2 __REG(0x40000108) /* Request to Channel Map Register for I2S receive Request */ -- cgit v1.2.3 From 399c153f430958da436e0b6a8290fb607def2549 Mon Sep 17 00:00:00 2001 From: eric miao Date: Tue, 27 Nov 2007 03:12:52 +0100 Subject: [ARM] 4673/1: pxa: add missing IRQ_SSP4 definitions for PXA3xx Signed-off-by: eric miao Signed-off-by: Russell King --- include/asm-arm/arch-pxa/irqs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index 1c762078424..b76ee6d1f5b 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h @@ -58,6 +58,7 @@ #endif #ifdef CONFIG_PXA3xx +#define IRQ_SSP4 PXA_IRQ(13) /* SSP4 service request */ #define IRQ_CIR PXA_IRQ(34) /* Consumer IR */ #define IRQ_TSI PXA_IRQ(36) /* Touch Screen Interface (PXA320) */ #define IRQ_USIM2 PXA_IRQ(38) /* USIM2 Controller */ -- cgit v1.2.3 From 4a78942d0b7655d120f28f2160bc4fa40c6da9ff Mon Sep 17 00:00:00 2001 From: eric miao Date: Tue, 27 Nov 2007 03:13:31 +0100 Subject: [ARM] 4674/1: pxa: increase LCD PCLK drive strength to fast 2mA for PXA300/PXA310 Some platforms (e.g. Littleton) requires LCD PCLK drive strength to be higher than default to cope with the fast PCLK frequency. Signed-off-by: eric miao Signed-off-by: Russell King --- include/asm-arm/arch-pxa/mfp-pxa300.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-arm/arch-pxa/mfp-pxa300.h b/include/asm-arm/arch-pxa/mfp-pxa300.h index 822a27cd786..a2099664988 100644 --- a/include/asm-arm/arch-pxa/mfp-pxa300.h +++ b/include/asm-arm/arch-pxa/mfp-pxa300.h @@ -179,7 +179,7 @@ #define GPIO62_LCD_CS_N MFP_CFG_DRV(GPIO62, AF2, DS01X) #define GPIO72_LCD_FCLK MFP_CFG_DRV(GPIO72, AF1, DS01X) #define GPIO73_LCD_LCLK MFP_CFG_DRV(GPIO73, AF1, DS01X) -#define GPIO74_LCD_PCLK MFP_CFG_DRV(GPIO74, AF1, DS01X) +#define GPIO74_LCD_PCLK MFP_CFG_DRV(GPIO74, AF1, DS02X) #define GPIO75_LCD_BIAS MFP_CFG_DRV(GPIO75, AF1, DS01X) #define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF2, DS01X) -- cgit v1.2.3 From 98aa686494f92e881869f76bfb734cbb1f53cb13 Mon Sep 17 00:00:00 2001 From: Roel Kluin <12o3l@tiscali.nl> Date: Thu, 29 Nov 2007 14:25:21 +0100 Subject: [ARM] 4680/1: parentheses around NR_IRQS definition If NR_IRQS is defined as a sum without surrounding parentheses, this may lead to problems when used in multiplications. This may lead to problems in: arch/ia64/sn/kernel/irq.c:516 arch/x86/kernel/io_apic_32.c:693, 694, 699, 700 fs/proc/proc_misc.c:464 Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Lennert Buytenhek Signed-off-by: Russell King --- include/asm-arm/arch-ixp23xx/irqs.h | 2 +- include/asm-arm/arch-omap/board-innovator.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-ixp23xx/irqs.h b/include/asm-arm/arch-ixp23xx/irqs.h index e6963958572..27c58089895 100644 --- a/include/asm-arm/arch-ixp23xx/irqs.h +++ b/include/asm-arm/arch-ixp23xx/irqs.h @@ -153,7 +153,7 @@ */ #define NR_IXP23XX_MACH_IRQS 32 -#define NR_IRQS NR_IXP23XX_IRQS + NR_IXP23XX_MACH_IRQS +#define NR_IRQS (NR_IXP23XX_IRQS + NR_IXP23XX_MACH_IRQS) #define IXP23XX_MACH_IRQ(irq) (NR_IXP23XX_IRQ + (irq)) diff --git a/include/asm-arm/arch-omap/board-innovator.h b/include/asm-arm/arch-omap/board-innovator.h index b3cf33441f6..56d2c98e143 100644 --- a/include/asm-arm/arch-omap/board-innovator.h +++ b/include/asm-arm/arch-omap/board-innovator.h @@ -37,7 +37,7 @@ #define OMAP1510P1_EMIFF_PRI_VALUE 0x00 #define NR_FPGA_IRQS 24 -#define NR_IRQS IH_BOARD_BASE + NR_FPGA_IRQS +#define NR_IRQS (IH_BOARD_BASE + NR_FPGA_IRQS) #ifndef __ASSEMBLY__ void fpga_write(unsigned char val, int reg); -- cgit v1.2.3 From 54fd6441e04696c046d93e4407a9e1ee9b874e51 Mon Sep 17 00:00:00 2001 From: Pavel Kiryukhin Date: Tue, 27 Nov 2007 19:20:47 +0300 Subject: [MIPS] Fix use of smp_processor_id() in preemptible code. Freeing prom memory: 956kb freed Freeing firmware memory: 978944k freed Freeing unused kernel memory: 180k freed BUG: using smp_processor_id() in preemptible [00000000] code: swapper/1 caller is r4k_dma_cache_wback_inv+0x144/0x2a0 Call Trace: [<80117af8>] r4k_dma_cache_wback_inv+0x144/0x2a0 [<802e4b84>] debug_smp_processor_id+0xd4/0xf0 [<802e4b7c>] debug_smp_processor_id+0xcc/0xf0 ... CONFIG_DEBUG_PREEMPT is enabled. -- Bug cause is blast_dcache_range() in preemptible code [in r4k_dma_cache_wback_inv()]. blast_dcache_range() is constructed via __BUILD_BLAST_CACHE_RANGE that uses cpu_dcache_line_size(). It uses current_cpu_data that use smp_processor_id() in turn. In case of CONFIG_DEBUG_PREEMPT smp_processor_id emits BUG if we are executing with preemption enabled. Cpu options of cpu0 are assumed to be the superset of all processors. Can I make the same assumptions for cache line size and fix this issue the following way: Signed-off-by: Ralf Baechle --- include/asm-mips/cpu-features.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h index f6bd308f047..5ea701fc342 100644 --- a/include/asm-mips/cpu-features.h +++ b/include/asm-mips/cpu-features.h @@ -207,13 +207,13 @@ #endif #ifndef cpu_dcache_line_size -#define cpu_dcache_line_size() current_cpu_data.dcache.linesz +#define cpu_dcache_line_size() cpu_data[0].dcache.linesz #endif #ifndef cpu_icache_line_size -#define cpu_icache_line_size() current_cpu_data.icache.linesz +#define cpu_icache_line_size() cpu_data[0].icache.linesz #endif #ifndef cpu_scache_line_size -#define cpu_scache_line_size() current_cpu_data.scache.linesz +#define cpu_scache_line_size() cpu_data[0].scache.linesz #endif #endif /* __ASM_CPU_FEATURES_H */ -- cgit v1.2.3