13 Jun, 2017

1 commit

  • Pull Xtensa fixes from Max Filippov:

    - don't use linux IRQ #0 in legacy irq domains: fixes timer interrupt
    assignment when it's hardware IRQ # is 0 and the kernel is built w/o
    device tree support

    - reduce reservation size for double exception vector literals from 48
    to 20 bytes: fixes build on cores with small user exception vector

    - cleanups: use kmalloc_array instead of kmalloc in simdisk_init and
    seq_puts instead of seq_printf in c_show.

    * tag 'xtensa-20170612' of git://github.com/jcmvbkbc/linux-xtensa:
    xtensa: don't use linux IRQ #0
    xtensa: reduce double exception literal reservation
    xtensa: ISS: Use kmalloc_array() in simdisk_init()
    xtensa: Use seq_puts() in c_show()

    Linus Torvalds
     

06 Jun, 2017

1 commit

  • Linux IRQ #0 is reserved for error reporting and may not be used.
    Increase NR_IRQS for one additional slot and increase
    irq_domain_add_legacy parameter first_irq value to 1, so that linux
    IRQ #0 is not associated with hardware IRQ #0 in legacy IRQ domains.
    Introduce macro XTENSA_PIC_LINUX_IRQ for static translation of xtensa
    PIC hardware IRQ # to linux IRQ #. Use this macro in XTFPGA platform
    data definitions.

    This fixes inability to use hardware IRQ #0 in configurations that don't
    use device tree and allows for non-identity mapping between linux IRQ #
    and hardware IRQ #.

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     

09 May, 2017

1 commit

  • * A multiplication for the size determination of a memory allocation
    indicated that an array data structure should be processed.
    Thus use the corresponding function "kmalloc_array".

    This issue was detected by using the Coccinelle software.

    * Replace the specification of a data type by a pointer dereference
    to make the corresponding size determination a bit safer according to
    the Linux coding style convention.

    Signed-off-by: Markus Elfring
    Signed-off-by: Max Filippov

    Markus Elfring
     

14 Mar, 2017

3 commits


25 Dec, 2016

1 commit


06 Oct, 2016

1 commit

  • Pull Xtensa updates from Max Filippov:
    "Updates for the xtensa architecture. It is a combined set of patches
    for 4.8 that never got to the mainline and new patches for 4.9.

    - add new kernel memory layouts for MMUv3 cores: with 256MB and 512MB
    KSEG size, starting at physical address other than 0

    - make kernel load address configurable

    - clean up kernel memory layout macros

    - drop sysmem early allocator and switch to memblock

    - enable kmemleak and memory reservation from the device tree

    - wire up new syscalls: userfaultfd, membarrier, mlock2,
    copy_file_range, preadv2 and pwritev2

    - add new platform: Cadence Configurable System Platform (CSP) and
    new core variant for it: xt_lnx

    - rearrange CCOUNT calibration code, make most of it generic

    - improve machine reset code (XTFPGA now reboots reliably with MMUv3
    cores)

    - provide default memmap command line option for configurations
    without device tree support

    - ISS fixes: simdisk is now capable of using highmem pages, panic
    correctly terminates simulator"

    * tag 'xtensa-20161005' of git://github.com/jcmvbkbc/linux-xtensa: (24 commits)
    xtensa: disable MMU initialization option on MMUv2 cores
    xtensa: add default memmap and mmio32native options to defconfigs
    xtensa: add default memmap option to common_defconfig
    xtensa: add default memmap option to iss_defconfig
    xtensa: ISS: allow simdisk to use high memory buffers
    xtensa: ISS: define simc_exit and use it instead of inline asm
    xtensa: xtfpga: group platform_* functions together
    xtensa: rearrange CCOUNT calibration
    xtensa: xtfpga: use clock provider, don't update DT
    xtensa: Tweak xuartps UART driver Rx watermark for Cadence CSP config.
    xtensa: initialize MMU before jumping to reset vector
    xtensa: fix icountlevel setting in cpu_reset
    xtensa: extract common CPU reset code into separate function
    xtensa: Added Cadence CSP kernel configuration for Xtensa
    xtensa: fix default kernel load address
    xtensa: wire up new syscalls
    xtensa: support reserved-memory DT node
    xtensa: drop sysmem and switch to memblock
    xtensa: minimize use of PLATFORM_DEFAULT_MEM_{ADDR,SIZE}
    xtensa: cleanup MMU setup and kernel layout macros
    ...

    Linus Torvalds
     

21 Sep, 2016

5 commits

  • ISS kernel by default has only low memory. But it may be configured to
    support high memory and started in a simulator with more than 128M of
    RAM. Simdisk driver in such configuration can get IO request with a
    high memory page. There may be no TLB entry for that page, only page
    table entry. However simulators don't do pagewalking, so such IO request
    will fail. Touch IO buffer in the buffer read/write loop so that a TLB
    entry is likely there when read or write simcall is invoked.

    Signed-off-by: Max Filippov

    Max Filippov
     
  • A number of ISS platform functions use inline assembly to invoke
    simulator exit, not all correctly. Define simc_exit(exit_code) and use
    it instead of inline assembly.

    Signed-off-by: Max Filippov

    Max Filippov
     
  • Group platform_* functions together and turn two separate #ifdef/#ifndef
    blocks into single #ifdef/#else. No functional changes.

    Signed-off-by: Max Filippov

    Max Filippov
     
  • DT-enabled kernel should have a CPU node connected to a clock. This clock
    is the CCOUNT clock. Use old platform_calibrate_ccount call as a fallback
    when CPU node cannot be found or has no clock and in non-DT-enabled
    configurations.

    Drop no longer needed code that updates CPU clock-frequency property in
    the DT; drop DT-related code from the platform_calibrate_ccount too.

    Move of_clk_init to the top of time_init, so that clocks are initialized
    before CCOUNT calibration is attempted.

    Signed-off-by: Max Filippov

    Max Filippov
     
  • Instead of querying hardcoded FPGA frequency register and then updating
    clock-frequency property in specificly named DT nodes in machine setup
    code register a clock provider that returns fixed-rate clock, configured
    by register specified in DT. This way we have less magic/hardcoded names
    and use more existing common clock framework code.

    Signed-off-by: Max Filippov
    Tested-by: Guenter Roeck

    Max Filippov
     

12 Sep, 2016

1 commit


25 Jun, 2016

1 commit

  • STD_COM_FLAGS is mostly a bad name for what the drivers thinks it is.
    Stop using it and pass the flags directly.

    cyclades defines it as 0, so we do not assign anything to freshly
    tty_port_init'ed structure.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

05 May, 2016

1 commit

  • Replace all trans_start updates with netif_trans_update helper.
    change was done via spatch:

    struct net_device *d;
    @@
    - d->trans_start = jiffies
    + netif_trans_update(d)

    Compile tested only.

    Cc: user-mode-linux-devel@lists.sourceforge.net
    Cc: linux-xtensa@linux-xtensa.org
    Cc: linux1394-devel@lists.sourceforge.net
    Cc: linux-rdma@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: MPT-FusionLinux.pdl@broadcom.com
    Cc: linux-scsi@vger.kernel.org
    Cc: linux-can@vger.kernel.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linux-omap@vger.kernel.org
    Cc: linux-hams@vger.kernel.org
    Cc: linux-usb@vger.kernel.org
    Cc: linux-wireless@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: devel@driverdev.osuosl.org
    Cc: b.a.t.m.a.n@lists.open-mesh.org
    Cc: linux-bluetooth@vger.kernel.org
    Signed-off-by: Florian Westphal
    Acked-by: Felipe Balbi
    Acked-by: Mugunthan V N
    Acked-by: Antonio Quartulli
    Signed-off-by: David S. Miller

    Florian Westphal
     

21 Mar, 2016

1 commit

  • Pull Xtensa updates from Chris Zankel:
    "Xtensa improvements for 4.6:

    - control whether perf IRQ is treated as NMI from Kconfig
    - implement ioremap for regions outside KIO segment
    - fix ISS serial port behaviour when EOF is reached
    - fix preemption in {clear,copy}_user_highpage
    - fix endianness issues for XTFPGA devices, big-endian cores are now
    fully functional
    - clean up debug infrastructure and add support for hardware
    breakpoints and watchpoints
    - add processor configurations for Three Core HiFi-2 MX and HiFi3
    cpus"

    * tag 'xtensa-next-20160320' of git://github.com/czankel/xtensa-linux:
    xtensa: add test_kc705_hifi variant
    xtensa: add Three Core HiFi-2 MX Variant.
    xtensa: support hardware breakpoints/watchpoints
    xtensa: use context structure for debug exceptions
    xtensa: remove remaining non-functional KGDB bits
    xtensa: clear all DBREAKC registers on start
    xtensa: xtfpga: fix earlycon endianness
    xtensa: xtfpga: fix i2c controller register width and endianness
    xtensa: xtfpga: fix ethernet controller endianness
    xtensa: xtfpga: fix serial port register width and endianness
    xtensa: define CONFIG_CPU_{BIG,LITTLE}_ENDIAN
    xtensa: fix preemption in {clear,copy}_user_highpage
    xtensa: ISS: don't hang if stdin EOF is reached
    xtensa: support ioremap for memory outside KIO region
    xtensa: use XTENSA_INT_LEVEL macro in asm/timex.h
    xtensa: make fake NMI configurable

    Linus Torvalds
     

11 Mar, 2016

3 commits


07 Feb, 2016

1 commit


29 Jan, 2016

1 commit


04 Jan, 2016

1 commit


11 Nov, 2015

1 commit

  • Pull block IO poll support from Jens Axboe:
    "Various groups have been doing experimentation around IO polling for
    (really) fast devices. The code has been reviewed and has been
    sitting on the side for a few releases, but this is now good enough
    for coordinated benchmarking and further experimentation.

    Currently O_DIRECT sync read/write are supported. A framework is in
    the works that allows scalable stats tracking so we can auto-tune
    this. And we'll add libaio support as well soon. Fow now, it's an
    opt-in feature for test purposes"

    * 'for-4.4/io-poll' of git://git.kernel.dk/linux-block:
    direct-io: be sure to assign dio->bio_bdev for both paths
    directio: add block polling support
    NVMe: add blk polling support
    block: add block polling support
    blk-mq: return tag/queue combo in the make_request_fn handlers
    block: change ->make_request_fn() and users to return a queue cookie

    Linus Torvalds
     

08 Nov, 2015

1 commit


02 Nov, 2015

2 commits

  • This fixes the following warning when default memory region crosses
    0x80000000:

    arch/xtensa/include/asm/processor.h:40:47: warning:
    integer overflow in expression [-Woverflow]
    #define TASK_SIZE (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE)
    ^
    Signed-off-by: Max Filippov

    Max Filippov
     
  • Build-time fixes:
    - make lbeg/lend/lcount save/restore conditional on kernel entry;
    - don't clear lcount in platform_restart functions unconditionally.

    Run-time fixes:
    - use correct end of range register in __endla paired with __loopt, not
    the unused temporary register. This fixes .bss zero-initialization.
    Update comments in asmmacro.h;
    - don't clobber a10 in the usercopy that leads to access to unmapped
    memory.

    Cc:
    Signed-off-by: Max Filippov

    Max Filippov
     

03 Sep, 2015

1 commit

  • Pull core block updates from Jens Axboe:
    "This first core part of the block IO changes contains:

    - Cleanup of the bio IO error signaling from Christoph. We used to
    rely on the uptodate bit and passing around of an error, now we
    store the error in the bio itself.

    - Improvement of the above from myself, by shrinking the bio size
    down again to fit in two cachelines on x86-64.

    - Revert of the max_hw_sectors cap removal from a revision again,
    from Jeff Moyer. This caused performance regressions in various
    tests. Reinstate the limit, bump it to a more reasonable size
    instead.

    - Make /sys/block//queue/discard_max_bytes writeable, by me.
    Most devices have huge trim limits, which can cause nasty latencies
    when deleting files. Enable the admin to configure the size down.
    We will look into having a more sane default instead of UINT_MAX
    sectors.

    - Improvement of the SGP gaps logic from Keith Busch.

    - Enable the block core to handle arbitrarily sized bios, which
    enables a nice simplification of bio_add_page() (which is an IO hot
    path). From Kent.

    - Improvements to the partition io stats accounting, making it
    faster. From Ming Lei.

    - Also from Ming Lei, a basic fixup for overflow of the sysfs pending
    file in blk-mq, as well as a fix for a blk-mq timeout race
    condition.

    - Ming Lin has been carrying Kents above mentioned patches forward
    for a while, and testing them. Ming also did a few fixes around
    that.

    - Sasha Levin found and fixed a use-after-free problem introduced by
    the bio->bi_error changes from Christoph.

    - Small blk cgroup cleanup from Viresh Kumar"

    * 'for-4.3/core' of git://git.kernel.dk/linux-block: (26 commits)
    blk: Fix bio_io_vec index when checking bvec gaps
    block: Replace SG_GAPS with new queue limits mask
    block: bump BLK_DEF_MAX_SECTORS to 2560
    Revert "block: remove artifical max_hw_sectors cap"
    blk-mq: fix race between timeout and freeing request
    blk-mq: fix buffer overflow when reading sysfs file of 'pending'
    Documentation: update notes in biovecs about arbitrarily sized bios
    block: remove bio_get_nr_vecs()
    fs: use helper bio_add_page() instead of open coding on bi_io_vec
    block: kill merge_bvec_fn() completely
    md/raid5: get rid of bio_fits_rdev()
    md/raid5: split bio for chunk_aligned_read
    block: remove split code in blkdev_issue_{discard,write_same}
    btrfs: remove bio splitting and merge_bvec_fn() calls
    bcache: remove driver private bio splitting code
    block: simplify bio_add_page()
    block: make generic_make_request handle arbitrarily sized bios
    blk-cgroup: Drop unlikely before IS_ERR(_OR_NULL)
    block: don't access bio->bi_error after bio_put()
    block: shrink struct bio down to 2 cache lines again
    ...

    Linus Torvalds
     

29 Jul, 2015

1 commit

  • Currently we have two different ways to signal an I/O error on a BIO:

    (1) by clearing the BIO_UPTODATE flag
    (2) by returning a Linux errno value to the bi_end_io callback

    The first one has the drawback of only communicating a single possible
    error (-EIO), and the second one has the drawback of not beeing persistent
    when bios are queued up, and are not passed along from child to parent
    bio in the ever more popular chaining scenario. Having both mechanisms
    available has the additional drawback of utterly confusing driver authors
    and introducing bugs where various I/O submitters only deal with one of
    them, and the others have to add boilerplate code to deal with both kinds
    of error returns.

    So add a new bi_error field to store an errno value directly in struct
    bio and remove the existing mechanisms to clean all this up.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Reviewed-by: NeilBrown
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

13 Jul, 2015

1 commit


17 Jun, 2015

1 commit

  • The network.c code is piggybacking off of the arch independent
    CONFIG_NET, which is bool. So the code is either built in or
    absent. It will never be modular, so using module_init as an
    alias for __initcall is rather misleading.

    Fix this up now, so that we can relocate module_init from
    init.h into module.h in the future. If we don't do this, we'd
    have to add module.h to obviously non-modular code, and that
    would be a worse thing.

    Direct use of __initcall is discouraged, vs prioritized ones.
    Use of device_initcall is consistent with what __initcall
    maps onto, and hence does not change the init order, making the
    impact of this change zero. Should someone with real hardware
    for boot testing want to change it later to arch_initcall or
    something different, they can do that at a later date.

    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Thomas Meyer
    Cc: linux-xtensa@linux-xtensa.org
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

14 Apr, 2015

1 commit


13 Apr, 2015

2 commits

  • Signed-off-by: Max Filippov

    Max Filippov
     
  • - don't lock lp->lock in the iss_net_timer for the call of iss_net_poll,
    it will lock it itself;
    - invert order of lp->lock and opened_lock acquisition in the
    iss_net_open to make it consistent with iss_net_poll;
    - replace spin_lock with spin_lock_bh when acquiring locks used in
    iss_net_timer from non-atomic context;
    - replace spin_lock_irqsave with spin_lock_bh in the iss_net_start_xmit
    as the driver doesn't use lp->lock in the hard IRQ context;
    - replace __SPIN_LOCK_UNLOCKED(lp.lock) with spin_lock_init, otherwise
    lockdep is unhappy about using non-static key.

    Cc:
    Signed-off-by: Max Filippov

    Max Filippov
     

27 Feb, 2015

1 commit

  • LCD driver is always built for the XTFPGA platform, but its base address
    is not configurable, and is wrong for ML605/KC705. Its initialization
    locks up KC705 board hardware.

    Make the whole driver optional, and its base address and bus width
    configurable. Implement 4-bit bus access method.

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     

21 Oct, 2014

2 commits

  • The Stretch s6000 family support has been merged into mainline 5 years
    ago. There appear to be no users of this code since nobody complained
    that there is a merge error preventing compilation.

    Apart from the s6105 IP camera reference design there are no s6000 devices
    known to ever have run Linux and as the chips are out of production there
    probably never will be. The successor s7000 no longer uses an Xtensa core
    for the OS.

    Let's remove the code until someone is found who actually needs it.

    Signed-off-by: Daniel Glöckner
    Signed-off-by: Max Filippov

    Daniel Glöckner
     
  • This allows using xtfpga platform with both MMU and noMMU cores.

    Signed-off-by: Max Filippov

    Max Filippov
     

06 May, 2014

1 commit


10 Apr, 2014

1 commit


22 Feb, 2014

1 commit