19 Dec, 2014

1 commit

  • Pull more ACPI and power management updates from Rafael Wysocki:
    "These are regression fixes (leds-gpio, ACPI backlight driver,
    operating performance points library, ACPI device enumeration
    messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
    PM), some cleanups in the operating performance points (OPP)
    framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
    minor intel_pstate driver changes, a new MAINTAINERS entry for it and
    an ACPI fan driver change needed for better support of thermal
    management in user space.

    Specifics:

    - Fix a regression in leds-gpio introduced by a recent commit that
    inadvertently changed the name of one of the properties used by the
    driver (Fabio Estevam).

    - Fix a regression in the ACPI backlight driver introduced by a
    recent fix that missed one special case that had to be taken into
    account (Aaron Lu).

    - Drop the level of some new kernel messages from the ACPI core
    introduced by a recent commit to KERN_DEBUG which they should have
    used from the start and drop some other unuseful KERN_ERR messages
    printed by ACPI (Rafael J Wysocki).

    - Revert an incorrect commit modifying the cpupower tool (Prarit
    Bhargava).

    - Fix two regressions introduced by recent commits in the OPP library
    and clean up some existing minor issues in that code (Viresh
    Kumar).

    - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
    tree (or drop it where that can be done) in order to make it
    possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
    Hansson, Ludovic Desroches).

    There will be one more "CONFIG_PM_RUNTIME removal" batch after this
    one, because some new uses of it have been introduced during the
    current merge window, but that should be sufficient to finally get
    rid of it.

    - Make the ACPI EC driver more robust against race conditions related
    to GPE handler installation failures (Lv Zheng).

    - Prevent the ACPI device PM core code from attempting to disable
    GPEs that it has not enabled which confuses ACPICA and makes it
    report errors unnecessarily (Rafael J Wysocki).

    - Add a "force" command line switch to the intel_pstate driver to
    make it possible to override the blacklisting of some systems in
    that driver if needed (Ethan Zhao).

    - Improve intel_pstate code documentation and add a MAINTAINERS entry
    for it (Kristen Carlson Accardi).

    - Make the ACPI fan driver create cooling device interfaces witn
    names that reflect the IDs of the ACPI device objects they are
    associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

    That's necessary for user space thermal management tools to be able
    to connect the fans with the parts of the system they are supposed
    to be cooling properly. From Srinivas Pandruvada"

    * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
    MAINTAINERS: add entry for intel_pstate
    ACPI / video: update the skip case for acpi_video_device_in_dod()
    power / PM: Eliminate CONFIG_PM_RUNTIME
    NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / EC: Fix unexpected ec_remove_handlers() invocations
    Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
    tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
    PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
    mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
    PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
    ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / PM: Do not disable wakeup GPEs that have not been enabled
    ACPI / utils: Drop error messages from acpi_evaluate_reference()
    ...

    Linus Torvalds
     

15 Dec, 2014

3 commits

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     
  • Pull tty/serial driver updates from Greg KH:
    "Here's the big tty/serial driver update for 3.19-rc1.

    There are a number of TTY core changes/fixes in here from Peter Hurley
    that have all been teted in linux-next for a long time now. There are
    also the normal serial driver updates as well, full details in the
    changelog below"

    * tag 'tty-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (219 commits)
    serial: pxa: hold port.lock when reporting modem line changes
    tty-hvsi_lib: Deletion of an unnecessary check before the function call "tty_kref_put"
    tty: Deletion of unnecessary checks before two function calls
    n_tty: Fix read_buf race condition, increment read_head after pushing data
    serial: of-serial: add PM suspend/resume support
    Revert "serial: of-serial: add PM suspend/resume support"
    Revert "serial: of-serial: fix up PM ops on no_console_suspend and port type"
    serial: 8250: don't attempt a trylock if in sysrq
    serial: core: Add big-endian iotype
    serial: samsung: use port->fifosize instead of hardcoded values
    serial: samsung: prefer to use fifosize from driver data
    serial: samsung: fix style problems
    serial: samsung: wait for transfer completion before clock disable
    serial: icom: fix error return code
    serial: tegra: clean up tty-flag assignments
    serial: Fix io address assign flow with Fintek PCI-to-UART Product
    serial: mxs-auart: fix tx_empty against shift register
    serial: mxs-auart: fix gpio change detection on interrupt
    serial: mxs-auart: Fix mxs_auart_set_ldisc()
    serial: 8250_dw: Use 64-bit access for OCTEON.
    ...

    Linus Torvalds
     
  • Pull take two of the GPIO updates:
    "Same stuff as last time, now with a fixup patch for the previous
    compile error plus I ran a few extra rounds of compile-testing.

    This is the bulk of GPIO changes for the v3.19 series:

    - A new API that allows setting more than one GPIO at the time. This
    is implemented for the new descriptor-based API only and makes it
    possible to e.g. toggle a clock and data line at the same time, if
    the hardware can do this with a single register write. Both
    consumers and drivers need new calls, and the core will fall back
    to driving individual lines where needed. Implemented for the
    MPC8xxx driver initially

    - Patched the mdio-mux-gpio and the serial mctrl driver that drives
    modems to use the new multiple-setting API to set several signals
    simultaneously

    - Get rid of the global GPIO descriptor array, and instead allocate
    descriptors dynamically for each GPIO on a certain GPIO chip. This
    moves us closer to getting rid of the limitation of using the
    global, static GPIO numberspace

    - New driver and device tree bindings for 74xx ICs

    - New driver and device tree bindings for the VF610 Vybrid

    - Support the RCAR r8a7793 and r8a7794

    - Guidelines for GPIO device tree bindings trying to get things a bit
    more strict with the advent of combined device properties

    - Suspend/resume support for the MVEBU driver

    - A slew of minor fixes and improvements"

    * tag 'gpio-v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (33 commits)
    gpio: mcp23s08: fix up compilation error
    gpio: pl061: document gpio-ranges property for bindings file
    gpio: pl061: hook request if gpio-ranges avaiable
    gpio: mcp23s08: Add option to configure IRQ output polarity as active high
    gpio: fix deferred probe detection for legacy API
    serial: mctrl_gpio: use gpiod_set_array function
    mdio-mux-gpio: Use GPIO descriptor interface and new gpiod_set_array function
    gpio: remove const modifier from gpiod_get_direction()
    gpio: remove gpio_descs global array
    gpio: mxs: implement get_direction callback
    gpio: em: Use dynamic allocation of GPIOs
    gpio: Check if base is positive before calling gpio_is_valid()
    gpio: mcp23s08: Add simple IRQ support for SPI devices
    gpio: mcp23s08: request a shared interrupt
    gpio: mcp23s08: Do not free unrequested interrupt
    gpio: rcar: Add r8a7793 and r8a7794 support
    gpio-mpc8xxx: add mpc8xxx_gpio_set_multiple function
    gpiolib: allow simultaneous setting of multiple GPIO outputs
    gpio: mvebu: add suspend/resume support
    gpio: gpio-davinci: remove duplicate check on resource
    ..

    Linus Torvalds
     

13 Dec, 2014

2 commits

  • After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
    selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
    depending on CONFIG_PM_RUNTIME may now be changed to depend on
    CONFIG_PM.

    Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
    drivers/tty/.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • Pull trivial tree update from Jiri Kosina:
    "Usual stuff: documentation updates, printk() fixes, etc"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (24 commits)
    intel_ips: fix a type in error message
    cpufreq: cpufreq-dt: Move newline to end of error message
    ps3rom: fix error return code
    treewide: fix typo in printk and Kconfig
    ARM: dts: bcm63138: change "interupts" to "interrupts"
    Replace mentions of "list_struct" to "list_head"
    kernel: trace: fix printk message
    scsi: mpt2sas: fix ioctl in comment
    zbud, zswap: change module author email
    clocksource: Fix 'clcoksource' typo in comment
    arm: fix wording of "Crotex" in CONFIG_ARCH_EXYNOS3 help
    gpio: msm-v1: make boolean argument more obvious
    usb: Fix typo in usb-serial-simple.c
    PCI: Fix comment typo 'COMFIG_PM_OPS'
    powerpc: Fix comment typo 'CONIFG_8xx'
    powerpc: Fix comment typos 'CONFiG_ALTIVEC'
    clk: st: Spelling s/stucture/structure/
    isci: Spelling s/stucture/structure/
    usb: gadget: zero: Spelling s/infrastucture/infrastructure/
    treewide: Fix company name in module descriptions
    ...

    Linus Torvalds
     

10 Dec, 2014

2 commits

  • Pull scheduler updates from Ingo Molnar:
    "The main changes in this cycle are:

    - 'Nested Sleep Debugging', activated when CONFIG_DEBUG_ATOMIC_SLEEP=y.

    This instruments might_sleep() checks to catch places that nest
    blocking primitives - such as mutex usage in a wait loop. Such
    bugs can result in hard to debug races/hangs.

    Another category of invalid nesting that this facility will detect
    is the calling of blocking functions from within schedule() ->
    sched_submit_work() -> blk_schedule_flush_plug().

    There's some potential for false positives (if secondary blocking
    primitives themselves are not ready yet for this facility), but the
    kernel will warn once about such bugs per bootup, so the warning
    isn't much of a nuisance.

    This feature comes with a number of fixes, for problems uncovered
    with it, so no messages are expected normally.

    - Another round of sched/numa optimizations and refinements, for
    CONFIG_NUMA_BALANCING=y.

    - Another round of sched/dl fixes and refinements.

    Plus various smaller fixes and cleanups"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (54 commits)
    sched: Add missing rcu protection to wake_up_all_idle_cpus
    sched/deadline: Introduce start_hrtick_dl() for !CONFIG_SCHED_HRTICK
    sched/numa: Init numa balancing fields of init_task
    sched/deadline: Remove unnecessary definitions in cpudeadline.h
    sched/cpupri: Remove unnecessary definitions in cpupri.h
    sched/deadline: Fix rq->dl.pushable_tasks bug in push_dl_task()
    sched/fair: Fix stale overloaded status in the busiest group finding logic
    sched: Move p->nr_cpus_allowed check to select_task_rq()
    sched/completion: Document when to use wait_for_completion_io_*()
    sched: Update comments about CLONE_NEWUTS and CLONE_NEWIPC
    sched/fair: Kill task_struct::numa_entry and numa_group::task_list
    sched: Refactor task_struct to use numa_faults instead of numa_* pointers
    sched/deadline: Don't check CONFIG_SMP in switched_from_dl()
    sched/deadline: Reschedule from switched_from_dl() after a successful pull
    sched/deadline: Push task away if the deadline is equal to curr during wakeup
    sched/deadline: Add deadline rq status print
    sched/deadline: Fix artificial overrun introduced by yield_task_dl()
    sched/rt: Clean up check_preempt_equal_prio()
    sched/core: Use dl_bw_of() under rcu_read_lock_sched()
    sched: Check if we got a shallowest_idle_cpu before searching for least_loaded_cpu
    ...

    Linus Torvalds
     
  • Pull ARM SoC driver updates from Arnd Bergmann:
    "These are changes for drivers that are intimately tied to some SoC and
    for some reason could not get merged through the respective subsystem
    maintainer tree.

    The largest single change here this time around is the Tegra
    iommu/memory controller driver, which gets updated to the new iommu DT
    binding. More drivers like this are likely to follow for the
    following merge window, but we should be able to do those through the
    iommu maintainer.

    Other notable changes are:
    - reset controller drivers from the reset maintainer (socfpga, sti,
    berlin)
    - fixes for the keystone navigator driver merged last time
    - at91 rtc driver changes related to the at91 cleanups
    - ARM perf driver changes from Will Deacon
    - updates for the brcmstb_gisb driver"

    * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (53 commits)
    clocksource: arch_timer: Allow the device tree to specify uninitialized timer registers
    clocksource: arch_timer: Fix code to use physical timers when requested
    memory: Add NVIDIA Tegra memory controller support
    bus: brcmstb_gisb: Add register offset tables for older chips
    bus: brcmstb_gisb: Look up register offsets in a table
    bus: brcmstb_gisb: Introduce wrapper functions for MMIO accesses
    bus: brcmstb_gisb: Make the driver buildable on MIPS
    of: Add NVIDIA Tegra memory controller binding
    ARM: tegra: Move AHB Kconfig to drivers/amba
    amba: Add Kconfig file
    clk: tegra: Implement memory-controller clock
    serial: samsung: Fix serial config dependencies for exynos7
    bus: brcmstb_gisb: resolve section mismatch
    ARM: common: edma: edma_pm_resume may be unused
    ARM: common: edma: add suspend resume hook
    powerpc/iommu: Rename iommu_[un]map_sg functions
    rtc: at91sam9: add DT bindings documentation
    rtc: at91sam9: use clk API instead of relying on AT91_SLOW_CLOCK
    ARM: at91: add clk_lookup entry for RTT devices
    rtc: at91sam9: rework the Kconfig description
    ...

    Linus Torvalds
     

07 Dec, 2014

1 commit


02 Dec, 2014

1 commit

  • Make the serial_mctrl_gpio driver the first user of the new gpiod_set_array
    function, which is now available in the linux-gpio devel tree.
    All modem control output signals are now set simultaneously.

    Signed-off-by: Rojhalat Ibrahim
    Reviewed-by: Alexandre Courbot
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Linus Walleij

    Rojhalat Ibrahim
     

27 Nov, 2014

4 commits

  • Both uart_handle_dcd_change() and uart_handle_cts_change() require a
    port lock to be held and will emit a warning when lockdep is enabled.
    Held corresponding lock.

    This fixes the following warnings:

    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 0 at drivers/tty/serial/serial_core.c:2760 uart_handle_dcd_change+0xc8/0xf8()
    Modules linked in:
    CPU: 0 PID: 0 Comm: swapper Not tainted 3.18.0-rc5+ #26
    [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [] (show_stack) from [] (warn_slowpath_common+0x6c/0x8c)
    [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24)
    [] (warn_slowpath_null) from [] (uart_handle_dcd_change+0xc8/0xf8)
    [] (uart_handle_dcd_change) from [] (serial_pxa_irq+0x268/0x3b0)
    [] (serial_pxa_irq) from [] (handle_irq_event_percpu+0x50/0x16c)
    [] (handle_irq_event_percpu) from [] (handle_irq_event+0x3c/0x5c)
    [] (handle_irq_event) from [] (handle_level_irq+0x94/0x118)
    [] (handle_level_irq) from [] (generic_handle_irq+0x20/0x30)
    [] (generic_handle_irq) from [] (__handle_domain_irq+0x38/0x70)
    [] (__handle_domain_irq) from [] (ichp_handle_irq+0x24/0x34)
    [] (ichp_handle_irq) from [] (__irq_svc+0x44/0x54)
    Exception stack(0xc07c7f58 to 0xc07c7fa0)
    7f40: 00000001 00000001
    7f60: 00000000 20000013 c07c6000 00000000 00000000 c07ce0a4 c07d7798 00000000
    7f80: c07e8fb8 0000004c 00000000 c07c7fa0 c0044798 c0009f20 20000013 ffffffff
    [] (__irq_svc) from [] (arch_cpu_idle+0x28/0x38)
    [] (arch_cpu_idle) from [] (cpu_startup_entry+0x1b8/0x220)
    [] (cpu_startup_entry) from [] (start_kernel+0x39c/0x40c)
    ---[ end trace 4c1b7ae03f6d9d30 ]---
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 0 at drivers/tty/serial/serial_core.c:2791 uart_handle_cts_change+0xa0/0xdc()
    Modules linked in:
    CPU: 0 PID: 0 Comm: swapper Tainted: G W 3.18.0-rc5+ #26
    [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [] (show_stack) from [] (warn_slowpath_common+0x6c/0x8c)
    [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24)
    [] (warn_slowpath_null) from [] (uart_handle_cts_change+0xa0/0xdc)
    [] (uart_handle_cts_change) from [] (serial_pxa_irq+0x258/0x3b0)
    [] (serial_pxa_irq) from [] (handle_irq_event_percpu+0x50/0x16c)
    [] (handle_irq_event_percpu) from [] (handle_irq_event+0x3c/0x5c)
    [] (handle_irq_event) from [] (handle_level_irq+0x94/0x118)
    [] (handle_level_irq) from [] (generic_handle_irq+0x20/0x30)
    [] (generic_handle_irq) from [] (__handle_domain_irq+0x38/0x70)
    [] (__handle_domain_irq) from [] (ichp_handle_irq+0x24/0x34)
    [] (ichp_handle_irq) from [] (__irq_svc+0x44/0x54)
    Exception stack(0xc07c7f58 to 0xc07c7fa0)
    7f40: 00000001 00000001
    7f60: 00000000 20000013 c07c6000 00000000 00000000 c07ce0a4 c07d7798 00000000
    7f80: c07e8fb8 0000004c 00000000 c07c7fa0 c0044798 c0009f20 20000013 ffffffff
    [] (__irq_svc) from [] (arch_cpu_idle+0x28/0x38)
    [] (arch_cpu_idle) from [] (cpu_startup_entry+0x1b8/0x220)
    [] (cpu_startup_entry) from [] (start_kernel+0x39c/0x40c)
    ---[ end trace 4c1b7ae03f6d9d31 ]---

    Signed-off-by: Dmitry Eremin-Solenikov
    Acked-by: Robert Jarzmik
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Eremin-Solenikov
     
  • The tty_kref_put() function tests whether its argument is NULL and then
    returns immediately. Thus the test around the call is not needed.

    This issue was detected by using the Coccinelle software.

    Signed-off-by: Markus Elfring
    Signed-off-by: Greg Kroah-Hartman

    Markus Elfring
     
  • The functions put_device() and tty_kref_put() test whether their argument
    is NULL and then return immediately.
    Thus the test around the call is not needed.

    This issue was detected by using the Coccinelle software.

    Signed-off-by: Markus Elfring
    Signed-off-by: Greg Kroah-Hartman

    Markus Elfring
     
  • Commit 19e2ad6a09f0c06dbca19c98e5f4584269d913dd ("n_tty: Remove overflow
    tests from receive_buf() path") moved the increment of read_head into
    the arguments list of read_buf_addr(). Function calls represent a
    sequence point in C. Therefore read_head is incremented before the
    character c is placed in the buffer. Since the circular read buffer is
    a lock-less design since commit 6d76bd2618535c581f1673047b8341fd291abc67
    ("n_tty: Make N_TTY ldisc receive path lockless"), this creates a race
    condition that leads to communication errors.

    This patch modifies the code to increment read_head _after_ the data
    is placed in the buffer and thus fixes the race for non-SMP machines.
    To fix the problem for SMP machines, memory barriers must be added in
    a separate patch.

    Signed-off-by: Christian Riesch
    Cc:
    Signed-off-by: Greg Kroah-Hartman

    Christian Riesch
     

26 Nov, 2014

26 commits

  • This adds suspend/resume support for the of-serial driver
    to provide power management support on devices attatched.

    The handling may vary since not every of_serial device is
    an 8250 port. Currently only 8250 port handling is added
    in the suspend/resume function based on the type switch.

    Signed-off-by: Jingchang Lu
    Acked-by: Arnd Bergmann
    Tested-by: Joseph Lo
    Reviewed-by: Peter Hurley
    Tested-by: Florina Fainelli
    Signed-off-by: Greg Kroah-Hartman

    Jingchang Lu
     
  • This reverts commit 2dea53bf57783f243c892e99c10c6921e956aa7e.

    Turns out to be broken :(

    Cc: Jingchang Lu
    Cc: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This reverts commit 513e438581020334e0345561adeeeaefa36701be.

    It's broken :(

    Cc: Jingchang Lu
    Cc: Joseph Lo
    Cc: Peter Hurley
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Attempting to use SysRq via the 8250 serial port with spin lock
    debugging on on a uniprocessor system results in the following splat:

    SysRq :
    BUG: spinlock trylock failure on UP on CPU#0, swapper/0
    lock: serial8250_ports+0x0/0x8c0, .magic: dead4ead, .owner: swapper/0, .owner_cpu: 0
    CPU: 0 PID: 0 Comm: swapper Not tainted 3.18.0-rc4+ #37
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
    ffffffff8245ba00 ffffffff81628b28 ffffffff812c8d27 ffffffff81628b48
    ffffffff8106812e ffffffff8245ba00 ffffffff814e22ed ffffffff81628b68
    ffffffff810681a6 0000000000000000 0000000000000000 ffffffff81628b88
    Call Trace:
    [] dump_stack+0x19/0x1b
    [] spin_dump+0x7e/0xd0
    [] spin_bug+0x26/0x30
    [] do_raw_spin_trylock+0x4c/0x60
    [] _raw_spin_trylock+0x1d/0x60
    [] serial8250_console_write+0x68/0x190
    [] ? sprintf+0x40/0x50
    [] call_console_drivers.constprop.11+0x9e/0xf0
    [] console_unlock+0x3e6/0x490
    [] vprintk_emit+0x275/0x530
    [] printk+0x4d/0x4f
    [] __handle_sysrq+0x62/0x1b0
    [] ? __handle_sysrq+0x5/0x1b0
    [] handle_sysrq+0x26/0x30
    [] serial8250_rx_chars+0x1d7/0x250
    [] serial8250_handle_irq+0x7b/0x90
    [] serial8250_default_handle_irq+0x23/0x30
    [] serial8250_interrupt+0x63/0xe0
    [] handle_irq_event_percpu+0x4e/0x200
    [] handle_irq_event+0x41/0x70
    [] ? handle_edge_irq+0x1e/0x110
    [] handle_edge_irq+0x9e/0x110
    [] handle_irq+0x22/0x40
    [] do_IRQ+0x4e/0xf0
    [] common_interrupt+0x6d/0x6d
    [] ? default_idle+0x1f/0xd0
    [] ? default_idle+0x1d/0xd0
    [] arch_cpu_idle+0xf/0x20
    [] cpu_startup_entry+0x25b/0x360
    [] rest_init+0xbe/0xd0
    [] start_kernel+0x339/0x346
    [] x86_64_start_reservations+0x2a/0x2c
    [] x86_64_start_kernel+0xf2/0xf6
    HELP : loglevel(0-9) reboot(b) crash(c) show-all-locks(d) te...

    Before ebade5e833eda30 ("serial: 8250: Clean up the locking for -rt")
    this was handled by not even attempting to try the lock if port->sysrq,
    since it is known to be taken by the interrupt handler; see
    https://bugzilla.kernel.org/show_bug.cgi?id=6716#c1. Restore that
    behavior.

    Signed-off-by: Rabin Vincent
    Signed-off-by: Greg Kroah-Hartman

    Rabin Vincent
     
  • Since most drivers interpret UPIO_MEM32 to mean "little-endian" and use
    readl/writel to access the registers, add a parallel UPIO_MEM32BE to
    request the use of big-endian MMIO accessors (ioread32be/iowrite32be).

    Signed-off-by: Kevin Cernekee
    Signed-off-by: Greg Kroah-Hartman

    Kevin Cernekee
     
  • Hardcoded FIFO size can cause hardware performance limitation.
    Using real size value provides better FIFO usage.

    Signed-off-by: Robert Baldyga
    Signed-off-by: Greg Kroah-Hartman

    Robert Baldyga
     
  • If we have fifosize set in driver data we prefer to use it instead of default
    fifosize value (which is always 16). If there is defined fifosize for particular
    serial we prefer to use it, otherwise we use value from info, which is
    common for all serials on given platform.

    Signed-off-by: Robert Baldyga
    Signed-off-by: Greg Kroah-Hartman

    Robert Baldyga
     
  • Split lines longer than 80 chars and remove unnecessary whitespaces.

    Signed-off-by: Robert Baldyga
    Signed-off-by: Greg Kroah-Hartman

    Robert Baldyga
     
  • This patch adds waiting until transmit buffer and shifter will be empty
    before clock disabling.

    Without this fix it's possible to have clock disabled while data was
    not transmited yet, which causes unproper state of TX line and problems
    in following data transfers.

    Cc: # v2.6.26+
    Signed-off-by: Robert Baldyga
    Signed-off-by: Greg Kroah-Hartman

    Robert Baldyga
     
  • Return a negative error code on failure.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    identifier ret; expression e1,e2;
    @@
    (
    if (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Greg Kroah-Hartman

    Julia Lawall
     
  • The tty break and error flags are not bit masks so do not to use bitwise
    OR when assigning them.

    Note that there is no functional change due to the if-else construct and
    flag having been initialised to zero (TTY_NORMAL).

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • The original driver fixed the io address with 0xe000+idx*8,
    but real io address assigned from BIOS is dynamically from
    read PCI configure space 0x24, 0x20, 0x1c.

    The Fintek F81504/F81508/F81512 maybe malfunction without
    this patch and malfunction surely when more then 1 PCI card.

    Signed-off-by: Peter Hung
    Signed-off-by: Greg Kroah-Hartman

    Peter Hung
     
  • tx_empty() should test whether both the transmitter fifo and shifter
    for the port is empty, ie. the whole last char was transmitted.
    The shift register is empty if AUART_STAT_BUSY is cleared.
    The patch fixes the function against the shift register.

    According to i.MX23 and i.MX28 Reference Manual:
    AUART_STAT_TXFE:
    TX FIFO or transmit holding register is empty.

    AUART_STAT_BUSY:
    AUART still transmits bits.
    The BUSY signal goes HIGH as soon as the data is written to the
    transmit FIFO (that is, the FIFO is non-empty) and remains asserted
    HIGH while data is being transmitted.
    BUSY is negated only when the transmit FIFO is empty, and the last
    character has been transmitted from the shift register, including
    the stop bits.

    Signed-off-by: Janusz Uzycki
    Signed-off-by: Greg Kroah-Hartman

    Janusz Uzycki
     
  • mxs_auart_modem_status() did't detect gpio's state change
    because s->mctrl_prev was modified before by mctrl_gpio_get().
    The patch introduces mctrl_temp variable to fix the bug.

    Signed-off-by: Janusz Uzycki
    Signed-off-by: Greg Kroah-Hartman

    Janusz Uzycki
     
  • Commit 732a84a037a4 ("serial: core: Pass termios to set_ldisc() notifications")
    changed the set_ldisc prototype.

    At the time of this commit the mxs_auart driver did not implement set_ldisc,
    so that's why it has not been converted.

    Adapt also mxs_auart_set_ldisc() so that the following build warning can be
    fixed:

    drivers/tty/serial/mxs-auart.c:962:2: warning: initialization from
    incompatible pointer type
    .set_ldisc = mxs_auart_set_ldisc,
    ^
    drivers/tty/serial/mxs-auart.c:962:2: warning: (near initialization
    for 'mxs_auart_ops.set_ldisc')

    Signed-off-by: Fabio Estevam
    Tested-by: Janusz Uzycki
    Signed-off-by: Greg Kroah-Hartman

    Fabio Estevam
     
  • Although the existing code appears to work on most hardware, the
    hardware designers tell us that 8-bit access to the registers is not
    guaranteed to be reliable. Also the OCTEON simulation environments
    prohibit 8-bit accesses.

    For these reasons, we use __raw_readq/__raw_writeq for OCTEON. This
    code is protected with #ifdef CONFIG_64BIT so it still builds under
    configurations lacking readq/writeq.

    We can get rid of the #ifdef __BIG_ENDIAN, as under 64-bit accesses,
    OCTEON is byte order invariant.

    Signed-off-by: David Daney
    Signed-off-by: Aleksey Makarov
    Signed-off-by: Greg Kroah-Hartman

    David Daney
     
  • When CONFIG_SERIAL_IMX_CONSOLE=n and CONFIG_CONSOLE_POLL=y we get the following
    build warning:

    drivers/tty/serial/imx.c:306:13: warning: 'imx_port_ucrs_save' defined but not used [-Wunused-function]
    drivers/tty/serial/imx.c:315:13: warning: 'imx_port_ucrs_restore' defined but not used [-Wunused-function]

    imx_port_ucrs_save/restore are only used under CONFIG_SERIAL_IMX_CONSOLE, so
    their definitions should be also be protected only by CONFIG_SERIAL_IMX_CONSOLE.

    This was detected when building 'allmodconfig'.

    Reported-by: Olof's autobuilder
    Signed-off-by: Fabio Estevam
    Signed-off-by: Greg Kroah-Hartman

    Fabio Estevam
     
  • Dan Carpenter reported:
    |drivers/tty/serial/8250/8250_omap.c:1025 omap8250_probe()
    |warn: unsigned 'up.port.line' is never less than zero.
    |1025 if (up.port.line < 0) {

    Since of_alias_get_id() and pdev->id can get negative I check for the
    error via ret variable.

    Reported-by: Dan Carpenter
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     
  • Dan Carpenter reported:
    |drivers/tty/serial/8250/8250_omap.c:1025 omap8250_probe()
    |warn: unsigned 'up.port.line' is never less than zero.
    |1025 if (up.port.line < 0) {

    I (wrongly) assumed that line is an int and compiler didn't complain nor
    did sparse. Since of_alias_get_id() and pdev->id can get negative I
    check for the error via ret variable.

    Reported-by: Dan Carpenter
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     
  • The mcb_device_id table is supposed to be zero-terminated.

    Signed-off-by: Axel Lin
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • in CSR A7DA SoC, uart6 located at BT module and it need multiple clock
    sources, so for "sirf,marco-bt-uart" compatible uarts, drivers take 3
    clock sources and enable them.

    this patch also replaces clk_get by devm_clk_get function and fix DT
    binding document in which we missed to fix when we added marco platform
    in commit 909102db44f "serial: sirf: add support for Marco chip".

    Signed-off-by: Qipan Li
    Signed-off-by: Barry Song
    Signed-off-by: Greg Kroah-Hartman

    Qipan Li
     
  • Convert the pr_warning to the more common pr_warn.

    Other miscellanea:

    o Convert unusual PR_FMT define and uses to pr_fmt
    o Remove unnecessary OOM message
    o Fix grammar in an error message
    o Convert a pr_warning with a KERN_ERR to pr_err

    Signed-off-by: Joe Perches
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches
     
  • This commit deals with the checkpatch warning "Unnecessary space before
    function pointer arguments".

    Signed-off-by: Konrad Zapalowicz
    Signed-off-by: Greg Kroah-Hartman

    Konrad Zapalowicz
     
  • The changed function flushes the tx UART and the '4' corresponds to the
    UART_FCR_CLEAR_XMIT value. This commit replaces the magic number with
    this define.

    Signed-off-by: Konrad Zapalowicz
    Signed-off-by: Greg Kroah-Hartman

    Konrad Zapalowicz
     
  • This commit fixes the alignment of the 'case's i the switch statement.

    Signed-off-by: Konrad Zapalowicz
    Signed-off-by: Greg Kroah-Hartman

    Konrad Zapalowicz
     
  • The flow of {neo,cls}_param() shows that at this stage the baud rate
    has a non-zero value. This fact makes the if clausule obsolete and
    acknowledges it's removal.

    Signed-off-by: Konrad Zapalowicz
    Signed-off-by: Greg Kroah-Hartman

    Konrad Zapalowicz