Skip to content

Commit

Permalink
Merge tag 'cris-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/jesper/cris

Pull CRIS updates from Jesper Nilsson.

* tag 'cris-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris:
  cris: return of class_create should be considered
  CRIS: defconfig: remove MTDRAM_ABS_POS
  CRIS v32: remove some double unlocks
  Fix typos
  cris: migrate exception table users off module.h and onto extable.h
  cris: v10: axisflashmap: remove unused ifdefs
  cris: use generic io.h
  cris: fix Kconfig mismatch when building with CONFIG_PCI
  cris: cardbus: fix header include path
  cris: add dev88_defconfig
  cris: irq: stop loop from accessing array out of bounds
  cris: fasttimer: fix mixed declarations and code compile warning
  cris: intmem: fix pointer comparison compile warning
  cris: intmem: fix device_initcall compile warning
  • Loading branch information
torvalds committed Oct 10, 2016
2 parents 93c26d7 + 2dc024e commit 057a056
Show file tree
Hide file tree
Showing 22 changed files with 83 additions and 217 deletions.
2 changes: 1 addition & 1 deletion arch/cris/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 0 additions & 19 deletions arch/cris/arch-v10/drivers/axisflashmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/arch-v10/drivers/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/arch-v10/lib/dram_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/arch-v32/drivers/cryptocop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/arch-v32/drivers/pci/bios.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <linux/pci.h>
#include <linux/kernel.h>
#include <arch/hwregs/intr_vect.h>
#include <hwregs/intr_vect.h>

void pcibios_fixup_bus(struct pci_bus *b)
{
Expand Down
6 changes: 6 additions & 0 deletions arch/cris/arch-v32/drivers/sync_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 7 additions & 8 deletions arch/cris/arch-v32/kernel/fasttimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions arch/cris/arch-v32/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion arch/cris/arch-v32/mach-a3/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/arch-v32/mach-a3/dram_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
1 change: 0 additions & 1 deletion arch/cris/arch-v32/mach-fs/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/arch-v32/mach-fs/dram_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
13 changes: 10 additions & 3 deletions arch/cris/arch-v32/mm/intmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

1 change: 0 additions & 1 deletion arch/cris/configs/artpec_3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
48 changes: 48 additions & 0 deletions arch/cris/configs/dev88_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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_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
1 change: 0 additions & 1 deletion arch/cris/configs/etrax-100lx_v2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion arch/cris/configs/etraxfs_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/include/arch-v32/arch/cryptocop.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 057a056

Please sign in to comment.