From 9d74179a226c83dd610c487a27ac6082b768b074 Mon Sep 17 00:00:00 2001 From: Jesper Nilsson Date: Thu, 22 Sep 2016 16:03:52 +0200 Subject: cris: intmem: fix device_initcall compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cannot add __init macro to crisv32_intmem_init, since the function is being called by other functions. Creating a wrapper instead. arch/cris/arch-v32/mm/intmem.c: At top level: arch/cris/arch-v32/mm/intmem.c:148:17: warning: initialization from incompatible pointer type device_initcall(crisv32_intmem_init); ^ include/linux/init.h:184:58: note: in definition of macro ‘__define_initcall’ __attribute__((__section__(".initcall" #id ".init"))) = fn; \ arch/cris/arch-v32/mm/intmem.c:148:1: note: in expansion of macro ‘device_initcall’ device_initcall(crisv32_intmem_init); ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/mm/intmem.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/mm/intmem.c b/arch/cris/arch-v32/mm/intmem.c index 9ef56092a4c5..bad735d46c51 100644 --- a/arch/cris/arch-v32/mm/intmem.c +++ b/arch/cris/arch-v32/mm/intmem.c @@ -145,5 +145,12 @@ unsigned long crisv32_intmem_virt_to_phys(void* addr) (unsigned long)intmem_virtual + MEM_INTMEM_START + RESERVED_SIZE); } -device_initcall(crisv32_intmem_init); + +static int __init crisv32_intmem_setup(void) +{ + crisv32_intmem_init(); + + return 0; +} +device_initcall(crisv32_intmem_setup); -- cgit v1.2.3 From 506823f6e7a349ba3f26f03f162733af64c300cc Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Thu, 22 Sep 2016 16:08:38 +0200 Subject: cris: intmem: fix pointer comparison compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code previously depended on list_head being defined as the first item in struct intmem_allocation. arch/cris/arch-v32/mm/intmem.c: In function ‘crisv32_intmem_free’: arch/cris/arch-v32/mm/intmem.c:116:14: warning: comparison of distinct pointer types lacks a cast if ((prev != &intmem_allocations) && ^ arch/cris/arch-v32/mm/intmem.c:123:14: warning: comparison of distinct pointer types lacks a cast if ((next != &intmem_allocations) && ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/mm/intmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/mm/intmem.c b/arch/cris/arch-v32/mm/intmem.c index bad735d46c51..c80728401487 100644 --- a/arch/cris/arch-v32/mm/intmem.c +++ b/arch/cris/arch-v32/mm/intmem.c @@ -113,14 +113,14 @@ void crisv32_intmem_free(void* addr) allocation->status = STATUS_FREE; /* Join with prev and/or next if also free */ - if ((prev != &intmem_allocations) && + if ((&prev->entry != &intmem_allocations) && (prev->status == STATUS_FREE)) { prev->size += allocation->size; list_del(&allocation->entry); kfree(allocation); allocation = prev; } - if ((next != &intmem_allocations) && + if ((&next->entry != &intmem_allocations) && (next->status == STATUS_FREE)) { allocation->size += next->size; list_del(&next->entry); -- cgit v1.2.3 From d355bcb0d82835db142db3c469541c98d5d9091c Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Thu, 22 Sep 2016 16:12:48 +0200 Subject: cris: fasttimer: fix mixed declarations and code compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit arch/cris/arch-v32/kernel/fasttimer.c: In function ‘timer_trig_handler’: arch/cris/arch-v32/kernel/fasttimer.c:353:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] fast_timer_function_type *f; ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/kernel/fasttimer.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c index 5c84dbb99f30..eb4e0ff36295 100644 --- a/arch/cris/arch-v32/kernel/fasttimer.c +++ b/arch/cris/arch-v32/kernel/fasttimer.c @@ -318,11 +318,13 @@ timer_trig_interrupt(int irq, void *dev_id) static void timer_trig_handler(struct work_struct *work) { - reg_timer_rw_ack_intr ack_intr = { 0 }; - reg_timer_rw_intr_mask intr_mask; - reg_timer_rw_trig_cfg trig_cfg = { 0 }; - struct fast_timer *t; - unsigned long flags; + reg_timer_rw_ack_intr ack_intr = { 0 }; + reg_timer_rw_intr_mask intr_mask; + reg_timer_rw_trig_cfg trig_cfg = { 0 }; + struct fast_timer *t; + fast_timer_function_type *f; + unsigned long d; + unsigned long flags; /* We keep interrupts disabled not only when we modify the * fast timer list, but any time we hold a reference to a @@ -350,9 +352,6 @@ static void timer_trig_handler(struct work_struct *work) fast_timer_running = 0; fast_timer_ints++; - fast_timer_function_type *f; - unsigned long d; - t = fast_timer_list; while (t) { struct fasttime_t tv; -- cgit v1.2.3 From 75e52ba125702608809726c1884046117631d0fe Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Thu, 22 Sep 2016 16:21:13 +0200 Subject: cris: irq: stop loop from accessing array out of bounds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit array "interrupt" only has 32 or 64 elements, depending on machine. arch/cris/arch-v32/kernel/irq.c: In function ‘init_IRQ’: arch/cris/arch-v32/kernel/irq.c:475:3: warning: iteration 32u invokes undefined behavior [-Waggressive-loop-optimizations] set_exception_vector(i, interrupt[j]); ^ arch/cris/arch-v32/kernel/irq.c:474:2: note: containing loop for (i = FIRST_IRQ, j = 0; j < NBR_INTR_VECT; i++, j++) { ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/kernel/irq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index 6de8db67cb09..b07da4b695aa 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c @@ -471,9 +471,8 @@ init_IRQ(void) irq_set_default_host(domain); of_node_put(np); - for (i = FIRST_IRQ, j = 0; j < NBR_INTR_VECT; i++, j++) { + for (i = FIRST_IRQ, j = 0; j < NBR_INTR_VECT && j < MACH_IRQS; i++, j++) set_exception_vector(i, interrupt[j]); - } /* Mark Timer and IPI IRQs as CPU local */ irq_allocations[TIMER0_INTR_VECT - FIRST_IRQ].cpu = CPU_FIXED; -- cgit v1.2.3 From 7daa7709c0d7a74c6b36443c65b0a22e45308b59 Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Thu, 22 Sep 2016 16:41:20 +0200 Subject: cris: add dev88_defconfig It is not possible to netboot a dev88 using etraxfs_defconfig, since etraxfs_defconfig does not set CONFIG_ETRAX_MEM_GRP*_CONFIG or CONFIG_ETRAX_SDRAM_GRP*_CONFIG, and the default values does not work. This new defconfig has correct memory configuration values, points out the correct DTB to build in (CONFIG_BUILTIN_DTB="dev88"), enables the serial driver (CONFIG_SERIAL_ETRAXFS) and the GPIO driver (CONFIG_GPIO_ETRAXFS), and enables LEDS. Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson --- arch/cris/configs/dev88_defconfig | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 arch/cris/configs/dev88_defconfig (limited to 'arch/cris') diff --git a/arch/cris/configs/dev88_defconfig b/arch/cris/configs/dev88_defconfig new file mode 100644 index 000000000000..7028ca240be6 --- /dev/null +++ b/arch/cris/configs/dev88_defconfig @@ -0,0 +1,49 @@ +CONFIG_BUILTIN_DTB="dev88" +# CONFIG_SWAP is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_BLK_DEV_INITRD=y +CONFIG_EXPERT=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_ETRAX_FAST_TIMER=y +CONFIG_ETRAXFS=y +CONFIG_ETRAX_DRAM_SIZE=32 +CONFIG_ETRAX_FLASH1_SIZE=4 +CONFIG_ETRAX_MEM_GRP1_CONFIG=0x40688 +CONFIG_ETRAX_MEM_GRP3_CONFIG=0x3 +CONFIG_ETRAX_MEM_GRP4_CONFIG=0x10040 +CONFIG_ETRAX_SDRAM_GRP0_CONFIG=0x958 +CONFIG_ETRAX_SDRAM_TIMING=0x824a +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_INET_LRO is not set +# CONFIG_IPV6 is not set +CONFIG_NETFILTER=y +CONFIG_ETRAX_ETHERNET=y +CONFIG_ETRAX_AXISFLASHMAP=y +CONFIG_DEVTMPFS=y +CONFIG_MTD_RAM=y +CONFIG_MTDRAM_TOTAL_SIZE=0 +CONFIG_MTDRAM_ERASE_SIZE=64 +CONFIG_MTDRAM_ABS_POS=0x0 +CONFIG_BLK_DEV_RAM=y +CONFIG_NETDEVICES=y +# CONFIG_INPUT is not set +# CONFIG_SERIO_SERPORT is not set +# CONFIG_VT is not set +CONFIG_SERIAL_ETRAXFS=y +CONFIG_SERIAL_ETRAXFS_CONSOLE=y +CONFIG_GPIO_ETRAXFS=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_PROC_KCORE=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +CONFIG_CRAMFS=y +CONFIG_NFS_FS=y -- cgit v1.2.3 From d6094cedecea679447270fcef5db2dfabb08ad65 Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Thu, 22 Sep 2016 16:42:30 +0200 Subject: cris: cardbus: fix header include path arch/cris/arch-v32/drivers/pci/bios.c:3:35: fatal error: arch/hwregs/intr_vect.h: No such file or directory #include ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/drivers/pci/bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c index 64a5fb93767d..212266a2c5d9 100644 --- a/arch/cris/arch-v32/drivers/pci/bios.c +++ b/arch/cris/arch-v32/drivers/pci/bios.c @@ -1,6 +1,6 @@ #include #include -#include +#include void pcibios_fixup_bus(struct pci_bus *b) { -- cgit v1.2.3 From 2765262f7b005a11d6c7abb3c06ea9fdd09712bd Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Thu, 22 Sep 2016 16:43:17 +0200 Subject: cris: fix Kconfig mismatch when building with CONFIG_PCI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I/O port access. Normally there is no I/O space on CRIS but when Cardbus/PCI is enabled the request is passed through the bridge. lib/pci_iomap.c: In function ‘pci_iomap_range’: lib/pci_iomap.c:43:3: error: implicit declaration of function ‘ioport_map’ [-Werror=implicit-function-declaration] return __pci_ioport_map(dev, start, len); ^ Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson --- arch/cris/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index deba2662b9f3..71b758dc3a96 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -30,7 +30,7 @@ config GENERIC_CALIBRATE_DELAY default y config NO_IOPORT_MAP - def_bool y + def_bool y if !PCI config FORCE_MAX_ZONEORDER int -- cgit v1.2.3 From 4c241d3c7bd628df7e84712046e9c130d48cae21 Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Thu, 22 Sep 2016 16:44:57 +0200 Subject: cris: use generic io.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes the warning: lib/iomap.c: In function ‘ioread8_rep’: ./arch/cris/include/asm/io.h:139:31: warning: statement with no effect [-Wunused-value] #define insb(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0) ^ lib/iomap.c:56:3: note: in definition of macro ‘IO_COND’ is_pio; \ ^ lib/iomap.c:197:16: note: in expansion of macro ‘insb’ IO_COND(addr, insb(port,dst,count), mmio_insb(addr, dst, count)); ^ cris_iops was previously set to NULL (no matter if CONFIG_PCI was set or not), but was removed in commit ab28e96fd1cf ("CRIS v32: remove old GPIO and LEDs code"). Before commit ab28e96fd1cf ("CRIS v32: remove old GPIO and LEDs code"), cris_iops could have been set from an external module, since it was exported, but as commit c24bf9b4cc6a ("CRIS: fix I/O macros") noted, the macros using cris_iops have been broken since first included, so they could never have worked. Because of this, instead of readding cris_iops, remove all special handling of cris_iops. By doing so, we can rely on the default implementation of almost all functions previously defined in our arch specific io.h. Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson --- arch/cris/include/asm/io.h | 171 +-------------------------------------------- 1 file changed, 1 insertion(+), 170 deletions(-) (limited to 'arch/cris') diff --git a/arch/cris/include/asm/io.h b/arch/cris/include/asm/io.h index cce8664d5dd6..fe0b2a0ae03b 100644 --- a/arch/cris/include/asm/io.h +++ b/arch/cris/include/asm/io.h @@ -8,34 +8,6 @@ #include #include -struct cris_io_operations -{ - u32 (*read_mem)(void *addr, int size); - void (*write_mem)(u32 val, int size, void *addr); - u32 (*read_io)(u32 port, void *addr, int size, int count); - void (*write_io)(u32 port, void *addr, int size, int count); -}; - -#ifdef CONFIG_PCI -extern struct cris_io_operations *cris_iops; -#else -#define cris_iops ((struct cris_io_operations*)NULL) -#endif - -/* - * Change virtual addresses to physical addresses and vv. - */ - -static inline unsigned long virt_to_phys(volatile void * address) -{ - return __pa(address); -} - -static inline void * phys_to_virt(unsigned long address) -{ - return __va(address); -} - extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); extern void __iomem * __ioremap_prot(unsigned long phys_addr, unsigned long size, pgprot_t prot); @@ -48,147 +20,6 @@ extern void iounmap(volatile void * __iomem addr); extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size); -/* - * IO bus memory addresses are also 1:1 with the physical address - */ -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt - -/* - * readX/writeX() are used to access memory mapped devices. On some - * architectures the memory mapped IO stuff needs to be accessed - * differently. On the CRIS architecture, we just read/write the - * memory location directly. - */ -#ifdef CONFIG_PCI -#define PCI_SPACE(x) ((((unsigned)(x)) & 0x10000000) == 0x10000000) -#else -#define PCI_SPACE(x) 0 -#endif -static inline unsigned char readb(const volatile void __iomem *addr) -{ - if (PCI_SPACE(addr) && cris_iops) - return cris_iops->read_mem((void*)addr, 1); - else - return *(volatile unsigned char __force *) addr; -} -static inline unsigned short readw(const volatile void __iomem *addr) -{ - if (PCI_SPACE(addr) && cris_iops) - return cris_iops->read_mem((void*)addr, 2); - else - return *(volatile unsigned short __force *) addr; -} -static inline unsigned int readl(const volatile void __iomem *addr) -{ - if (PCI_SPACE(addr) && cris_iops) - return cris_iops->read_mem((void*)addr, 4); - else - return *(volatile unsigned int __force *) addr; -} -#define readb_relaxed(addr) readb(addr) -#define readw_relaxed(addr) readw(addr) -#define readl_relaxed(addr) readl(addr) -#define __raw_readb readb -#define __raw_readw readw -#define __raw_readl readl - -static inline void writeb(unsigned char b, volatile void __iomem *addr) -{ - if (PCI_SPACE(addr) && cris_iops) - cris_iops->write_mem(b, 1, (void*)addr); - else - *(volatile unsigned char __force *) addr = b; -} -static inline void writew(unsigned short b, volatile void __iomem *addr) -{ - if (PCI_SPACE(addr) && cris_iops) - cris_iops->write_mem(b, 2, (void*)addr); - else - *(volatile unsigned short __force *) addr = b; -} -static inline void writel(unsigned int b, volatile void __iomem *addr) -{ - if (PCI_SPACE(addr) && cris_iops) - cris_iops->write_mem(b, 4, (void*)addr); - else - *(volatile unsigned int __force *) addr = b; -} -#define writeb_relaxed(b, addr) writeb(b, addr) -#define writew_relaxed(b, addr) writew(b, addr) -#define writel_relaxed(b, addr) writel(b, addr) -#define __raw_writeb writeb -#define __raw_writew writew -#define __raw_writel writel - -#define mmiowb() - -#define memset_io(a,b,c) memset((void *)(a),(b),(c)) -#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) -#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) - - -/* I/O port access. Normally there is no I/O space on CRIS but when - * Cardbus/PCI is enabled the request is passed through the bridge. - */ - -#define IO_SPACE_LIMIT 0xffff -#define inb(port) (cris_iops ? cris_iops->read_io(port,NULL,1,1) : 0) -#define inw(port) (cris_iops ? cris_iops->read_io(port,NULL,2,1) : 0) -#define inl(port) (cris_iops ? cris_iops->read_io(port,NULL,4,1) : 0) -#define insb(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0) -#define insw(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,2,count) : 0) -#define insl(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,4,count) : 0) -static inline void outb(unsigned char data, unsigned int port) -{ - if (cris_iops) - cris_iops->write_io(port, (void *) &data, 1, 1); -} -static inline void outw(unsigned short data, unsigned int port) -{ - if (cris_iops) - cris_iops->write_io(port, (void *) &data, 2, 1); -} -static inline void outl(unsigned int data, unsigned int port) -{ - if (cris_iops) - cris_iops->write_io(port, (void *) &data, 4, 1); -} -static inline void outsb(unsigned int port, const void *addr, - unsigned long count) -{ - if (cris_iops) - cris_iops->write_io(port, (void *)addr, 1, count); -} -static inline void outsw(unsigned int port, const void *addr, - unsigned long count) -{ - if (cris_iops) - cris_iops->write_io(port, (void *)addr, 2, count); -} -static inline void outsl(unsigned int port, const void *addr, - unsigned long count) -{ - if (cris_iops) - cris_iops->write_io(port, (void *)addr, 4, count); -} - -#define inb_p(port) inb(port) -#define inw_p(port) inw(port) -#define inl_p(port) inl(port) -#define outb_p(val, port) outb((val), (port)) -#define outw_p(val, port) outw((val), (port)) -#define outl_p(val, port) outl((val), (port)) - -/* - * Convert a physical pointer to a virtual kernel pointer for /dev/mem - * access - */ -#define xlate_dev_mem_ptr(p) __va(p) - -/* - * Convert a virtual cached pointer to an uncached pointer - */ -#define xlate_dev_kmem_ptr(p) p +#include #endif -- cgit v1.2.3 From 0e1847c4b1592fcb1e66f1e427105d2ff8781271 Mon Sep 17 00:00:00 2001 From: Niklas Cassel Date: Fri, 10 Jun 2016 18:21:20 +0200 Subject: cris: v10: axisflashmap: remove unused ifdefs The Kconfig CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE does not exist for crisv10, so remove it. Signed-off-by: Niklas Cassel Signed-off-by: Jesper Nilsson --- arch/cris/arch-v10/drivers/axisflashmap.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c index bdc25aa43468..28292da49664 100644 --- a/arch/cris/arch-v10/drivers/axisflashmap.c +++ b/arch/cris/arch-v10/drivers/axisflashmap.c @@ -177,15 +177,6 @@ static struct mtd_partition axis_partitions[MAX_PARTITIONS] = { }, }; -#ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE -/* Main flash device */ -static struct mtd_partition main_partition = { - .name = "main", - .size = 0, - .offset = 0 -}; -#endif - /* * Probe a chip select for AMD-compatible (JEDEC) or CFI-compatible flash * chips in that order (because the amd_flash-driver is faster). @@ -369,16 +360,6 @@ static int __init init_axis_flash(void) pidx++; } -#ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE - if (mymtd) { - main_partition.size = mymtd->size; - err = mtd_device_register(mymtd, &main_partition, 1); - if (err) - panic("axisflashmap: Could not initialize " - "partition for whole main mtd device!\n"); - } -#endif - if (mymtd) { if (use_default_ptable) { printk(KERN_INFO " Using default partition table.\n"); -- cgit v1.2.3 From 887358f91a3c26f746d419fd6e22277b8f8e50cf Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Fri, 23 Sep 2016 15:33:38 +0200 Subject: cris: migrate exception table users off module.h and onto extable.h This file was only including module.h for exception table related functions. We've now separated that content out into its own file "extable.h" so now move over to that and avoid all the extra header content in module.h that we don't really need to compile this file. Cc: Mikael Starvik Cc: Jesper Nilsson Cc: linux-cris-kernel@axis.com Signed-off-by: Paul Gortmaker Signed-off-by: Jesper Nilsson --- arch/cris/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c index 112ef26c7f2e..94183d3639ef 100644 --- a/arch/cris/mm/fault.c +++ b/arch/cris/mm/fault.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include -- cgit v1.2.3 From 8d59dc11bee785b03687e334919d68a552b7d0ba Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 23 Sep 2016 15:42:03 +0200 Subject: Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson --- arch/cris/arch-v10/drivers/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v10/drivers/eeprom.c b/arch/cris/arch-v10/drivers/eeprom.c index f679a19dfeb8..c903a9e53a47 100644 --- a/arch/cris/arch-v10/drivers/eeprom.c +++ b/arch/cris/arch-v10/drivers/eeprom.c @@ -395,7 +395,7 @@ static int eeprom_open(struct inode * inode, struct file * file) static loff_t eeprom_lseek(struct file * file, loff_t offset, int orig) { /* - * orig 0: position from begning of eeprom + * orig 0: position from beginning of eeprom * orig 1: relative from current position * orig 2: position from last eeprom address */ -- cgit v1.2.3 From 46813ddcce9373fc3035275c36321484b494871c Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 23 Sep 2016 15:42:05 +0200 Subject: Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson --- arch/cris/arch-v10/lib/dram_init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v10/lib/dram_init.S b/arch/cris/arch-v10/lib/dram_init.S index e541d3d8f922..93310124333f 100644 --- a/arch/cris/arch-v10/lib/dram_init.S +++ b/arch/cris/arch-v10/lib/dram_init.S @@ -3,7 +3,7 @@ * This file is intended to be included from other assembler files * * Note: This file may not modify r9 because r9 is used to carry - * information from the decompresser to the kernel + * information from the decompressor to the kernel * * Copyright (C) 2000-2012 Axis Communications AB * -- cgit v1.2.3 From 520c1748092d34c0effb773bd131752f3b9585ae Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Sat, 21 May 2016 13:54:29 +0200 Subject: Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/drivers/cryptocop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index 2081d8b45f06..b5698c876fcc 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c @@ -1210,7 +1210,7 @@ static int cryptocop_setup_dma_list(struct cryptocop_operation *operation, struc assert(active_count >= eop_needed_count); assert((eop_needed_count == 0) || (eop_needed_count == 1)); if (eop_needed_count) { - /* This means that the bulk operation (cipeher/m2m) is terminated. */ + /* This means that the bulk operation (cipher/m2m) is terminated. */ if (active_count > 1) { /* Use zero length EOP descriptor. */ struct cryptocop_dma_desc *ed = alloc_cdesc(alloc_flag); -- cgit v1.2.3 From a94c83c09937a1d513d21cdd652c4d8326794912 Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 23 Sep 2016 15:42:07 +0200 Subject: Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/mach-a3/dram_init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/mach-a3/dram_init.S b/arch/cris/arch-v32/mach-a3/dram_init.S index 5c4f24dce94c..7dc26bdb26b5 100644 --- a/arch/cris/arch-v32/mach-a3/dram_init.S +++ b/arch/cris/arch-v32/mach-a3/dram_init.S @@ -3,7 +3,7 @@ * This file is intended to be included from other assembler files * * Note: This file may not modify r8 or r9 because they are used to - * carry information from the decompresser to the kernel + * carry information from the decompressor to the kernel * * Copyright (C) 2005-2007 Axis Communications AB * -- cgit v1.2.3 From 60a7a19985244a8549fd3a7e4a18194ab710ddbf Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 23 Sep 2016 15:42:08 +0200 Subject: Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson --- arch/cris/include/arch-v32/arch/cryptocop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/include/arch-v32/arch/cryptocop.h b/arch/cris/include/arch-v32/arch/cryptocop.h index 716e434e9269..a56ac61a9931 100644 --- a/arch/cris/include/arch-v32/arch/cryptocop.h +++ b/arch/cris/include/arch-v32/arch/cryptocop.h @@ -81,7 +81,7 @@ struct cryptocop_tfrm_cfg { unsigned int flags; /* DECRYPT, ENCRYPT, EXPLICIT_IV */ - /* CBC initialisation vector for cihers. */ + /* CBC initialisation vector for ciphers. */ u8 iv[CRYPTOCOP_MAX_IV_LENGTH]; /* The position in output where to write the transform output. The order -- cgit v1.2.3 From 746d9dda5628de73f3f88b23374ef2588c6aad4a Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 23 Sep 2016 15:42:08 +0200 Subject: Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/mach-fs/dram_init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/mach-fs/dram_init.S b/arch/cris/arch-v32/mach-fs/dram_init.S index d3ce2eb04cb1..2ed51e247e8f 100644 --- a/arch/cris/arch-v32/mach-fs/dram_init.S +++ b/arch/cris/arch-v32/mach-fs/dram_init.S @@ -3,7 +3,7 @@ * This file is intended to be included from other assembler files * * Note: This file may not modify r8 or r9 because they are used to - * carry information from the decompresser to the kernel + * carry information from the decompressor to the kernel * * Copyright (C) 2000-2007 Axis Communications AB * -- cgit v1.2.3 From e1ae7ed216981c2271b672d4f0eb4213e63df7ff Mon Sep 17 00:00:00 2001 From: Andrea Gelmini Date: Fri, 23 Sep 2016 15:42:10 +0200 Subject: Fix typo Signed-off-by: Andrea Gelmini Signed-off-by: Jesper Nilsson --- arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris') diff --git a/arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h b/arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h index 5517f04153a4..c4b6b0e9b1da 100644 --- a/arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h +++ b/arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h @@ -61,7 +61,7 @@ #define IO_WIDTH(reg, field) IO_WIDTH_ (reg##_, field##_) #define IO_WIDTH_(reg_, field_) (reg_##_##field_##_WIDTH) -/*--- Obsolete. Kept for backw compatibility. ---*/ +/*--- Obsolete. Kept for backward compatibility. ---*/ /* Reads (or writes) a byte/uword/udword from the specified mode register. */ #define IO_RD(reg) (*(volatile u32*)(reg)) -- cgit v1.2.3 From a85f305f6e4e4055ac1f43e18a96417bcd146d45 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 23 Sep 2016 15:55:59 +0200 Subject: CRIS v32: remove some double unlocks We unlocked a few lines earlier so we can delete these unlocks. Signed-off-by: Dan Carpenter Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/mach-a3/dma.c | 1 - arch/cris/arch-v32/mach-fs/dma.c | 1 - 2 files changed, 2 deletions(-) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/mach-a3/dma.c b/arch/cris/arch-v32/mach-a3/dma.c index 47c64bf40eae..11f417f4da98 100644 --- a/arch/cris/arch-v32/mach-a3/dma.c +++ b/arch/cris/arch-v32/mach-a3/dma.c @@ -41,7 +41,6 @@ int crisv32_request_dma(unsigned int dmanr, const char *device_id, if (options & DMA_PANIC_ON_ERROR) panic("request_dma error!"); - spin_unlock_irqrestore(&dma_lock, flags); return -EBUSY; } clk_ctrl = REG_RD(clkgen, regi_clkgen, rw_clk_ctrl); diff --git a/arch/cris/arch-v32/mach-fs/dma.c b/arch/cris/arch-v32/mach-fs/dma.c index fc6416a671ea..7c93679c02ad 100644 --- a/arch/cris/arch-v32/mach-fs/dma.c +++ b/arch/cris/arch-v32/mach-fs/dma.c @@ -43,7 +43,6 @@ int crisv32_request_dma(unsigned int dmanr, const char *device_id, } if (options & DMA_PANIC_ON_ERROR) panic("request_dma error!"); - spin_unlock_irqrestore(&dma_lock, flags); return -EBUSY; } clk_ctrl = REG_RD(config, regi_config, rw_clk_ctrl); -- cgit v1.2.3 From 11c2ecdcf71bd801fda79bd99607388241d8d2ce Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Fri, 23 Sep 2016 16:00:57 +0200 Subject: CRIS: defconfig: remove MTDRAM_ABS_POS According to commit ef158bdf8374 ("mtd: Remove unused symbol CONFIG_MTDRAM_ABS_POS") Signed-off-by: Fabian Frederick Signed-off-by: Jesper Nilsson --- arch/cris/configs/artpec_3_defconfig | 1 - arch/cris/configs/dev88_defconfig | 1 - arch/cris/configs/etrax-100lx_v2_defconfig | 1 - arch/cris/configs/etraxfs_defconfig | 1 - 4 files changed, 4 deletions(-) (limited to 'arch/cris') diff --git a/arch/cris/configs/artpec_3_defconfig b/arch/cris/configs/artpec_3_defconfig index 70e497e0b03e..d31851f29db8 100644 --- a/arch/cris/configs/artpec_3_defconfig +++ b/arch/cris/configs/artpec_3_defconfig @@ -25,7 +25,6 @@ CONFIG_MTD_RAM=y CONFIG_MTD_MTDRAM=y CONFIG_MTDRAM_TOTAL_SIZE=0 CONFIG_MTDRAM_ERASE_SIZE=64 -CONFIG_MTDRAM_ABS_POS=0x0 CONFIG_BLK_DEV_RAM=y CONFIG_NETDEVICES=y # CONFIG_INPUT is not set diff --git a/arch/cris/configs/dev88_defconfig b/arch/cris/configs/dev88_defconfig index 7028ca240be6..beff4ee6edb3 100644 --- a/arch/cris/configs/dev88_defconfig +++ b/arch/cris/configs/dev88_defconfig @@ -28,7 +28,6 @@ CONFIG_DEVTMPFS=y CONFIG_MTD_RAM=y CONFIG_MTDRAM_TOTAL_SIZE=0 CONFIG_MTDRAM_ERASE_SIZE=64 -CONFIG_MTDRAM_ABS_POS=0x0 CONFIG_BLK_DEV_RAM=y CONFIG_NETDEVICES=y # CONFIG_INPUT is not set diff --git a/arch/cris/configs/etrax-100lx_v2_defconfig b/arch/cris/configs/etrax-100lx_v2_defconfig index a85aabf92be5..d90ac95c1e44 100644 --- a/arch/cris/configs/etrax-100lx_v2_defconfig +++ b/arch/cris/configs/etrax-100lx_v2_defconfig @@ -28,7 +28,6 @@ CONFIG_MTD_RAM=y CONFIG_MTD_MTDRAM=y CONFIG_MTDRAM_TOTAL_SIZE=0 CONFIG_MTDRAM_ERASE_SIZE=64 -CONFIG_MTDRAM_ABS_POS=0x0 CONFIG_BLK_DEV_RAM=y CONFIG_NETDEVICES=y # CONFIG_INPUT is not set diff --git a/arch/cris/configs/etraxfs_defconfig b/arch/cris/configs/etraxfs_defconfig index 91232680d6c8..f714e9dfef9b 100644 --- a/arch/cris/configs/etraxfs_defconfig +++ b/arch/cris/configs/etraxfs_defconfig @@ -25,7 +25,6 @@ CONFIG_MTD_RAM=y CONFIG_MTD_MTDRAM=y CONFIG_MTDRAM_TOTAL_SIZE=0 CONFIG_MTDRAM_ERASE_SIZE=64 -CONFIG_MTDRAM_ABS_POS=0x0 CONFIG_BLK_DEV_RAM=y CONFIG_NETDEVICES=y # CONFIG_INPUT is not set -- cgit v1.2.3 From 2dc024e94578c53e2c579a48725c8fe2527f9d5e Mon Sep 17 00:00:00 2001 From: "yizhouzhou@ict.ac.cn" Date: Fri, 23 Sep 2016 16:06:00 +0200 Subject: cris: return of class_create should be considered Return value of class_create should be considered in module init function. Signed-off-by: Zhouyi Zhou Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/drivers/sync_serial.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/cris') diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index e989cee77414..ef515af1a377 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c @@ -1627,6 +1627,12 @@ static int __init etrax_sync_serial_init(void) /* Create a sysfs class for syncser */ syncser_class = class_create(THIS_MODULE, "syncser_class"); + if (IS_ERR(syncser_class)) { + pr_err("Failed to create a sysfs class for syncser\n"); + unregister_chrdev_region(syncser_first, minor_count); + cdev_del(syncser_cdev); + return -1; + } /* Initialize Ports */ #if defined(CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT0) -- cgit v1.2.3