13 Feb, 2019

1 commit

  • [ Upstream commit 440e7b379f91acd245d5c8de94d533f40f5dffb3 ]

    arch/sh/boards/mach-kfr2r09/setup.c does not need to #include
    , and doing so causes a build warning, so drop that header
    file.

    In file included from ../arch/sh/boards/mach-kfr2r09/setup.c:28:
    ../include/linux/mtd/onenand.h:225:12: warning: 'struct mtd_oob_ops' declared inside parameter list will not be visible outside of this definition or declaration
    struct mtd_oob_ops *ops);

    Link: http://lkml.kernel.org/r/702f0a25-c63e-6912-4640-6ab0f00afbc7@infradead.org
    Fixes: f3590dc32974 ("media: arch: sh: kfr2r09: Use new renesas-ceu camera driver")

    Signed-off-by: Randy Dunlap
    Reported-by: Geert Uytterhoeven
    Suggested-by: Miquel Raynal
    Reviewed-by: Miquel Raynal
    Cc: Yoshinori Sato
    Cc: Rich Felker
    Cc: Jacopo Mondi
    Cc: Magnus Damm
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin

    Randy Dunlap
     

06 Dec, 2018

1 commit

  • commit bc715ee4dbc5db462c59b9cfba92d31b3274fe3a upstream.

    The function_graph_enter() function does the work of calling the function
    graph hook function and the management of the shadow stack, simplifying the
    work done in the architecture dependent prepare_ftrace_return().

    Have superh use the new code, and remove the shadow stack management as well as
    having to set up the trace structure.

    This is needed to prepare for a fix of a design bug on how the curr_ret_stack
    is used.

    Cc: Yoshinori Sato
    Cc: Rich Felker
    Cc: linux-sh@vger.kernel.org
    Cc: stable@kernel.org
    Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback")
    Reviewed-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt (VMware)
    Signed-off-by: Greg Kroah-Hartman

    Steven Rostedt (VMware)
     

24 Aug, 2018

1 commit

  • Commit a0f97e06a43c ("kbuild: enable 'make CFLAGS=...' to add
    additional options to CC") renamed CFLAGS to KBUILD_CFLAGS.

    Commit 222d394d30e7 ("kbuild: enable 'make AFLAGS=...' to add
    additional options to AS") renamed AFLAGS to KBUILD_AFLAGS.

    Commit 06c5040cdb13 ("kbuild: enable 'make CPPFLAGS=...' to add
    additional options to CPP") renamed CPPFLAGS to KBUILD_CPPFLAGS.

    For some reason, LDFLAGS was not renamed.

    Using a well-known variable like LDFLAGS may result in accidental
    override of the variable.

    Kbuild generally uses KBUILD_ prefixed variables for the internally
    appended options, so here is one more conversion to sanitize the
    naming convention.

    I did not touch Makefiles under tools/ since the tools build system
    is a different world.

    Signed-off-by: Masahiro Yamada
    Acked-by: Kirill A. Shutemov
    Reviewed-by: Palmer Dabbelt

    Masahiro Yamada
     

18 Aug, 2018

3 commits

  • Use new return type vm_fault_t for fault handler. For now, this is just
    documenting that the function returns a VM_FAULT value rather than an
    errno. Once all instances are converted, vm_fault_t will become a
    distinct type.

    Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t")

    In this patch all the caller of handle_mm_fault() are changed to return
    vm_fault_t type.

    Link: http://lkml.kernel.org/r/20180617084810.GA6730@jordon-HP-15-Notebook-PC
    Signed-off-by: Souptick Joarder
    Cc: Matthew Wilcox
    Cc: Richard Henderson
    Cc: Tony Luck
    Cc: Matt Turner
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Richard Kuo
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: James Hogan
    Cc: Ley Foon Tan
    Cc: Jonas Bonn
    Cc: James E.J. Bottomley
    Cc: Benjamin Herrenschmidt
    Cc: Palmer Dabbelt
    Cc: Yoshinori Sato
    Cc: David S. Miller
    Cc: Richard Weinberger
    Cc: Guan Xuetao
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: "Levin, Alexander (Sasha Levin)"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Souptick Joarder
     
  • As part of the effort to reduce the code duplication between _THIS_IP_
    and current_text_addr(), let's consolidate callers of
    current_text_addr() to use _THIS_IP_.

    Link: http://lkml.kernel.org/r/20180801185331.39535-1-ndesaulniers@google.com
    Signed-off-by: Nick Desaulniers
    Cc: Yoshinori Sato
    Cc: Rich Felker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Desaulniers
     
  • Instead of open-coding the loop, let's use canned macro.

    Also make sure we are not leaking "cpus" node reference.

    Link: http://lkml.kernel.org/r/20180624224252.GA220395@dtor-ws
    Signed-off-by: Dmitry Torokhov
    Reviewed-by: Andrew Morton
    Cc: Yoshinori Sato
    Cc: Rich Felker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry Torokhov
     

17 Aug, 2018

1 commit

  • Pull pci updates from Bjorn Helgaas:

    - Decode AER errors with names similar to "lspci" (Tyler Baicar)

    - Expose AER statistics in sysfs (Rajat Jain)

    - Clear AER status bits selectively based on the type of recovery (Oza
    Pawandeep)

    - Honor "pcie_ports=native" even if HEST sets FIRMWARE_FIRST (Alexandru
    Gagniuc)

    - Don't clear AER status bits if we're using the "Firmware-First"
    strategy where firmware owns the registers (Alexandru Gagniuc)

    - Use sysfs_match_string() to simplify ASPM sysfs parsing (Andy
    Shevchenko)

    - Remove unnecessary includes of (Bjorn Helgaas)

    - Defer DPC event handling to work queue (Keith Busch)

    - Use threaded IRQ for DPC bottom half (Keith Busch)

    - Print AER status while handling DPC events (Keith Busch)

    - Work around IDT switch ACS Source Validation erratum (James
    Puthukattukaran)

    - Emit diagnostics for all cases of PCIe Link downtraining (Links
    operating slower than they're capable of) (Alexandru Gagniuc)

    - Skip VFs when configuring Max Payload Size (Myron Stowe)

    - Reduce Root Port Max Payload Size if necessary when hot-adding a
    device below it (Myron Stowe)

    - Simplify SHPC existence/permission checks (Bjorn Helgaas)

    - Remove hotplug sample skeleton driver (Lukas Wunner)

    - Convert pciehp to threaded IRQ handling (Lukas Wunner)

    - Improve pciehp tolerance of missed events and initially unstable
    links (Lukas Wunner)

    - Clear spurious pciehp events on resume (Lukas Wunner)

    - Add pciehp runtime PM support, including for Thunderbolt controllers
    (Lukas Wunner)

    - Support interrupts from pciehp bridges in D3hot (Lukas Wunner)

    - Mark fall-through switch cases before enabling -Wimplicit-fallthrough
    (Gustavo A. R. Silva)

    - Move DMA-debug PCI init from arch code to PCI core (Christoph
    Hellwig)

    - Fix pci_request_irq() usage of IRQF_ONESHOT when no handler is
    supplied (Heiner Kallweit)

    - Unify PCI and DMA direction #defines (Shunyong Yang)

    - Add PCI_DEVICE_DATA() macro (Andy Shevchenko)

    - Check for VPD completion before checking for timeout (Bert Kenward)

    - Limit Netronome NFP5000 config space size to work around erratum
    (Jakub Kicinski)

    - Set IRQCHIP_ONESHOT_SAFE for PCI MSI irqchips (Heiner Kallweit)

    - Document ACPI description of PCI host bridges (Bjorn Helgaas)

    - Add "pci=disable_acs_redir=" parameter to disable ACS redirection for
    peer-to-peer DMA support (we don't have the peer-to-peer support yet;
    this is just one piece) (Logan Gunthorpe)

    - Clean up devm_of_pci_get_host_bridge_resources() resource allocation
    (Jan Kiszka)

    - Fixup resizable BARs after suspend/resume (Christian König)

    - Make "pci=earlydump" generic (Sinan Kaya)

    - Fix ROM BAR access routines to stay in bounds and check for signature
    correctly (Rex Zhu)

    - Add DMA alias quirk for Microsemi Switchtec NTB (Doug Meyer)

    - Expand documentation for pci_add_dma_alias() (Logan Gunthorpe)

    - To avoid bus errors, enable PASID only if entire path supports
    End-End TLP prefixes (Sinan Kaya)

    - Unify slot and bus reset functions and remove hotplug knowledge from
    callers (Sinan Kaya)

    - Add Function-Level Reset quirks for Intel and Samsung NVMe devices to
    fix guest reboot issues (Alex Williamson)

    - Add function 1 DMA alias quirk for Marvell 88SS9183 PCIe SSD
    Controller (Bjorn Helgaas)

    - Remove Xilinx AXI-PCIe host bridge arch dependency (Palmer Dabbelt)

    - Remove Aardvark outbound window configuration (Evan Wang)

    - Fix Aardvark bridge window sizing issue (Zachary Zhang)

    - Convert Aardvark to use pci_host_probe() to reduce code duplication
    (Thomas Petazzoni)

    - Correct the Cadence cdns_pcie_writel() signature (Alan Douglas)

    - Add Cadence support for optional generic PHYs (Alan Douglas)

    - Add Cadence power management ops (Alan Douglas)

    - Remove redundant variable from Cadence driver (Colin Ian King)

    - Add Kirin MSI support (Xiaowei Song)

    - Drop unnecessary root_bus_nr setting from exynos, imx6, keystone,
    armada8k, artpec6, designware-plat, histb, qcom, spear13xx (Shawn
    Guo)

    - Move link notification settings from DesignWare core to individual
    drivers (Gustavo Pimentel)

    - Add endpoint library MSI-X interfaces (Gustavo Pimentel)

    - Correct signature of endpoint library IRQ interfaces (Gustavo
    Pimentel)

    - Add DesignWare endpoint library MSI-X callbacks (Gustavo Pimentel)

    - Add endpoint library MSI-X test support (Gustavo Pimentel)

    - Remove unnecessary GFP_ATOMIC from Hyper-V "new child" allocation
    (Jia-Ju Bai)

    - Add more devices to Broadcom PAXC quirk (Ray Jui)

    - Work around corrupted Broadcom PAXC config space to enable SMMU and
    GICv3 ITS (Ray Jui)

    - Disable MSI parsing to work around broken Broadcom PAXC logic in some
    devices (Ray Jui)

    - Hide unconfigured functions to work around a Broadcom PAXC defect
    (Ray Jui)

    - Lower iproc log level to reduce console output during boot (Ray Jui)

    - Fix mobiveil iomem/phys_addr_t type usage (Lorenzo Pieralisi)

    - Fix mobiveil missing include file (Lorenzo Pieralisi)

    - Add mobiveil Kconfig/Makefile support (Lorenzo Pieralisi)

    - Fix mvebu I/O space remapping issues (Thomas Petazzoni)

    - Use generic pci_host_bridge in mvebu instead of ARM-specific API
    (Thomas Petazzoni)

    - Whitelist VMD devices with fast interrupt handlers to avoid sharing
    vectors with slow handlers (Keith Busch)

    * tag 'pci-v4.19-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (153 commits)
    PCI/AER: Don't clear AER bits if error handling is Firmware-First
    PCI: Limit config space size for Netronome NFP5000
    PCI/MSI: Set IRQCHIP_ONESHOT_SAFE for PCI-MSI irqchips
    PCI/VPD: Check for VPD access completion before checking for timeout
    PCI: Add PCI_DEVICE_DATA() macro to fully describe device ID entry
    PCI: Match Root Port's MPS to endpoint's MPSS as necessary
    PCI: Skip MPS logic for Virtual Functions (VFs)
    PCI: Add function 1 DMA alias quirk for Marvell 88SS9183
    PCI: Check for PCIe Link downtraining
    PCI: Add ACS Redirect disable quirk for Intel Sunrise Point
    PCI: Add device-specific ACS Redirect disable infrastructure
    PCI: Convert device-specific ACS quirks from NULL termination to ARRAY_SIZE
    PCI: Add "pci=disable_acs_redir=" parameter for peer-to-peer support
    PCI: Allow specifying devices using a base bus and path of devfns
    PCI: Make specifying PCI devices in kernel parameters reusable
    PCI: Hide ACS quirk declarations inside PCI core
    PCI: Delay after FLR of Intel DC P3700 NVMe
    PCI: Disable Samsung SM961/PM961 NVMe before FLR
    PCI: Export pcie_has_flr()
    PCI: mvebu: Drop bogus comment above mvebu_pcie_map_registers()
    ...

    Linus Torvalds
     

16 Aug, 2018

2 commits

  • Pull media updates from Mauro Carvalho Chehab:

    - new Socionext MN88443x ISDB-S/T demodulator driver: mn88443x

    - new sensor drivers: ak7375, ov2680 and rj54n1cb0c

    - an old soc-camera sensor driver converted to the V4L2 framework:
    mt9v111

    - a new Voice-Coil Motor (VCM) driver: dw9807-vcm

    - some cleanups at cx25821, removing legacy unused code

    - some improvements at ddbridge driver

    - new platform driver: vicodec

    - some DVB API cleanups, removing ioctls and compat code for old
    out-of-tree drivers that were never merged upstream

    - improvements at DVB core to support frontents that support both
    Satellite and non-satellite delivery systems

    - got rid of the unused VIDIOC_RESERVED V4L2 ioctl

    - some cleanups/improvements at gl861 ISDB driver

    - several improvements on ov772x, ov7670 and ov5640, imx274, ov5645,
    and smiapp sensor drivers

    - fixes at em28xx to support dual TS devices

    - some cleanups at V4L2/VB2 locking logic

    - some API improvements at media controller

    - some cec core and drivers improvements

    - some uvcvideo improvements

    - some improvements at platform drivers: stm32-dcmi, rcar-vin, coda,
    reneseas-ceu, imx, vsp1, venus, camss

    - lots of other cleanups and fixes

    * tag 'media/v4.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (406 commits)
    Revert "media: vivid: shut up warnings due to a non-trivial logic"
    siano: get rid of an unused return code for debugfs register
    media: isp: fix a warning about a wrong struct initializer
    media: radio-wl1273: fix return code for the polling routine
    media: s3c-camif: fix return code for the polling routine
    media: saa7164: fix return codes for the polling routine
    media: exynos-gsc: fix return code if mutex was interrupted
    media: mt9v111: Fix build error with no VIDEO_V4L2_SUBDEV_API
    media: xc4000: get rid of uneeded casts
    media: drxj: get rid of uneeded casts
    media: tuner-xc2028: don't use casts for printing sizes
    media: cleanup fall-through comments
    media: vivid: shut up warnings due to a non-trivial logic
    media: rtl28xxu: be sure that it won't go past the array size
    media: mt9v111: avoid going past the buffer
    media: vsp1_dl: add a description for cmdpool field
    media: sta2x11: add a missing parameter description
    media: v4l2-mem2mem: add descriptions to MC fields
    media: i2c: fix warning in Aptina MT9V111
    media: imx: shut up a false positive warning
    ...

    Linus Torvalds
     
  • Pull Kconfig consolidation from Masahiro Yamada:
    "Consolidation of Kconfig files by Christoph Hellwig.

    Move the source statements of arch-independent Kconfig files instead
    of duplicating the includes in every arch/$(SRCARCH)/Kconfig"

    * tag 'kconfig-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: add a Memory Management options" menu
    kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt
    kconfig: use a menu in arch/Kconfig to reduce clutter
    kconfig: include kernel/Kconfig.preempt from init/Kconfig
    Kconfig: consolidate the "Kernel hacking" menu
    kconfig: include common Kconfig files from top-level Kconfig
    kconfig: remove duplicate SWAP symbol defintions
    um: create a proper drivers Kconfig
    um: cleanup Kconfig files
    um: stop abusing KBUILD_KCONFIG

    Linus Torvalds
     

15 Aug, 2018

1 commit

  • Pull dma-mapping updates from Christoph Hellwig:

    - a series from Robin to fix bus imposed dma limits by adding a
    separate mask for them to struct device instead of trying to squeeze
    a second meaning out of the existing dma mask as we did before.

    This has ACKs from the various other subsystems touched

    - a small swiotlb cleanup from Kees (acked by Konrad)

    - conversion of nios2 and sh to the new generic dma-noncoherent code.

    Various other architecture conversions will come through the
    architectures maintainers trees.

    * tag 'dma-mapping-4.19' of git://git.infradead.org/users/hch/dma-mapping:
    sh: use generic dma_noncoherent_ops
    sh: split arch/sh/mm/consistent.c
    sh: use dma_direct_ops for the CONFIG_DMA_COHERENT case
    sh: introduce a sh_cacheop_vaddr helper
    sh: simplify get_arch_dma_ops
    OF: Don't set default coherent DMA mask
    ACPI/IORT: Don't set default coherent DMA mask
    iommu/dma: Respect bus DMA limit for IOVAs
    of/device: Set bus DMA mask as appropriate
    ACPI/IORT: Set bus DMA mask as appropriate
    dma-mapping: Generalise dma_32bit_limit flag
    ACPI/IORT: Support address size limit for root complexes
    of/platform: Initialise default DMA masks
    nios2: use generic dma_noncoherent_ops
    swiotlb: clean up reporting
    dma-mapping: relax warning for per-device areas

    Linus Torvalds
     

14 Aug, 2018

1 commit

  • Pull perf update from Thomas Gleixner:
    "The perf crowd presents:

    Kernel updates:

    - Removal of jprobes

    - Cleanup and consolidatation the handling of kprobes

    - Cleanup and consolidation of hardware breakpoints

    - The usual pile of fixes and updates to PMUs and event descriptors

    Tooling updates:

    - Updates and improvements all over the place. Nothing outstanding,
    just the (good) boring incremental grump work"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (103 commits)
    perf trace: Do not require --no-syscalls to suppress strace like output
    perf bpf: Include uapi/linux/bpf.h from the 'perf trace' script's bpf.h
    perf tools: Allow overriding MAX_NR_CPUS at compile time
    perf bpf: Show better message when failing to load an object
    perf list: Unify metric group description format with PMU event description
    perf vendor events arm64: Update ThunderX2 implementation defined pmu core events
    perf cs-etm: Generate branch sample for CS_ETM_TRACE_ON packet
    perf cs-etm: Generate branch sample when receiving a CS_ETM_TRACE_ON packet
    perf cs-etm: Support dummy address value for CS_ETM_TRACE_ON packet
    perf cs-etm: Fix start tracing packet handling
    perf build: Fix installation directory for eBPF
    perf c2c report: Fix crash for empty browser
    perf tests: Fix indexing when invoking subtests
    perf trace: Beautify the AF_INET & AF_INET6 'socket' syscall 'protocol' args
    perf trace beauty: Add beautifiers for 'socket''s 'protocol' arg
    perf trace beauty: Do not print NULL strarray entries
    perf beauty: Add a generator for IPPROTO_ socket's protocol constants
    tools include uapi: Grab a copy of linux/in.h
    perf tests: Fix complex event name parsing
    perf evlist: Fix error out while applying initial delay and LBR
    ...

    Linus Torvalds
     

02 Aug, 2018

8 commits


31 Jul, 2018

1 commit

  • There is nothing arch-specific about PCI or dma-debug, so call
    dma_debug_add_bus() from the PCI core just after registering the bus type.

    Most of dma-debug is already generic; this just adds reporting of pending
    dma-allocations on driver unload for arches other than powerpc, sh, and
    x86.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Bjorn Helgaas
    Acked-by: Thomas Gleixner
    Acked-by: Michael Ellerman (powerpc)

    Christoph Hellwig
     

25 Jul, 2018

1 commit


28 Jun, 2018

5 commits

  • Currently the ov772x driver obtains a clock with a specific consumer ID.
    As there's a single clock for this driver, we could omit clock-names
    property in device tree by passing NULL as a consumer ID to clk_get().

    Cc: Laurent Pinchart
    Cc: Hans Verkuil
    Suggested-by: Laurent Pinchart
    Tested-by: Jacopo Mondi
    Signed-off-by: Akinobu Mita
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Akinobu Mita
     
  • The ov772x driver uses "rstb-gpios" and "pwdn-gpios" for reset and
    powerdown pins. However, using generic names for these gpios is
    preferred. ("reset-gpios" and "powerdown-gpios" respectively)

    There is only one mainline user for these gpios, so rename to generic
    names.

    Cc: Laurent Pinchart
    Cc: Hans Verkuil
    Reviewed-by: Jacopo Mondi
    Signed-off-by: Akinobu Mita
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Akinobu Mita
     
  • Use the new renesas-ceu camera driver in ap325rxa board file instead of
    the soc_camera based sh_mobile_ceu_camera driver.

    Get rid of soc_camera specific components, and register CEU0 with a single
    video sensor (ov7725).

    Memory for the CEU video buffers is now reserved with membocks APIs
    and need to be declared as dma_coherent during machine initialization to
    remove that architecture specific part from CEU driver.

    The ap325rxa board file registers another camera (ncm03j) for which I found no
    driver in mainline kernel version, and that was configured/probed by sending
    i2c messages (of 'magic blobs) from the board file itself. I removed the
    sensor registration from this new version as it used soc_camera components
    that will be later removed.

    While at there update license to SPDX header and sort headers alphabetically.

    Compile tested only.

    Signed-off-by: Jacopo Mondi
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Jacopo Mondi
     
  • Use the new renesas-ceu camera driver is ms7724se board file instead of
    the soc_camera based sh_mobile_ceu_camera driver.

    Get rid of soc_camera specific components, and register CEU0 and CEU1 with
    no active video subdevices.

    Memory for the CEU video buffers is now reserved with membocks APIs
    and need to be declared as dma_coherent during machine initialization to
    remove that architecture specific part from CEU driver.

    While at there update license to SPDX header and sort headers
    alphabetically.

    No need to udapte the clock source names, as
    commit c2f9b05fd5c1 ("media: arch: sh: ecovec: Use new renesas-ceu camera driver")
    already updated it to the new ceu driver name for all SH7724 boards
    (possibly breaking ms7724se before this commit).

    Compile tested only.

    Signed-off-by: Jacopo Mondi
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Jacopo Mondi
     
  • Use the new renesas-ceu camera driver in kfr2r09 board file instead of
    the soc_camera based sh_mobile_ceu_camera driver.

    Get rid of soc_camera specific components, and move clk and gpio handling
    away from board file, registering the clock source and the enable gpios
    for driver consumption.

    Memory for the CEU video buffers is now reserved with membocks APIs,
    and need to be declared as dma_coherent during machine initialization to
    remove that architecture specific part from CEU driver.

    While at there update license to SPDX header and sort headers alphabetically.

    No need to udapte the clock source names, as
    commit c2f9b05fd5c1 ("media: arch: sh: ecovec: Use new renesas-ceu camera driver")
    already updated it to the new ceu driver name for all SH7724 boards (possibly
    breaking kfr2r09 before this commit).

    Compile tested only.

    Signed-off-by: Jacopo Mondi
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Jacopo Mondi
     

26 Jun, 2018

4 commits

  • All architectures have implemented it, we can now remove the poor weak
    version.

    Signed-off-by: Frederic Weisbecker
    Cc: Alexander Shishkin
    Cc: Andy Lutomirski
    Cc: Arnaldo Carvalho de Melo
    Cc: Arnaldo Carvalho de Melo
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: Jiri Olsa
    Cc: Joel Fernandes
    Cc: Linus Torvalds
    Cc: Mark Rutland
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rich Felker
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/1529981939-8231-11-git-send-email-frederic@kernel.org
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • Migrate to the new API in order to remove arch_validate_hwbkpt_settings()
    that clumsily mixes up architecture validation and commit

    Signed-off-by: Frederic Weisbecker
    Cc: Alexander Shishkin
    Cc: Andy Lutomirski
    Cc: Arnaldo Carvalho de Melo
    Cc: Arnaldo Carvalho de Melo
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: Jiri Olsa
    Cc: Joel Fernandes
    Cc: Linus Torvalds
    Cc: Mark Rutland
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rich Felker
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/1529981939-8231-9-git-send-email-frederic@kernel.org
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • This field seem to be unused, perhaps a leftover from old code...

    Signed-off-by: Frederic Weisbecker
    Cc: Alexander Shishkin
    Cc: Andy Lutomirski
    Cc: Arnaldo Carvalho de Melo
    Cc: Arnaldo Carvalho de Melo
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: Jiri Olsa
    Cc: Joel Fernandes
    Cc: Linus Torvalds
    Cc: Mark Rutland
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rich Felker
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/1529981939-8231-8-git-send-email-frederic@kernel.org
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • We can't pass the breakpoint directly on arch_check_bp_in_kernelspace()
    anymore because its architecture internal datas (struct arch_hw_breakpoint)
    are not yet filled by the time we call the function, and most
    implementation need this backend to be up to date. So arrange the
    function to take the probing struct instead.

    Signed-off-by: Frederic Weisbecker
    Cc: Alexander Shishkin
    Cc: Andy Lutomirski
    Cc: Arnaldo Carvalho de Melo
    Cc: Arnaldo Carvalho de Melo
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: Jiri Olsa
    Cc: Joel Fernandes
    Cc: Linus Torvalds
    Cc: Mark Rutland
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rich Felker
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/1529981939-8231-3-git-send-email-frederic@kernel.org
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

21 Jun, 2018

8 commits

  • Many of the inc/dec ops are mandatory, but for most architectures inc/dec are
    simply trivial wrappers around their corresponding add/sub ops.

    Let's make all the inc/dec ops optional, so that we can get rid of these
    boilerplate wrappers.

    The instrumented atomics are updated accordingly.

    There should be no functional change as a result of this patch.

    Signed-off-by: Mark Rutland
    Reviewed-by: Will Deacon
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Palmer Dabbelt
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Link: https://lore.kernel.org/lkml/20180621121321.4761-17-mark.rutland@arm.com
    Signed-off-by: Ingo Molnar

    Mark Rutland
     
  • Some of the atomics return the result of a test applied after the atomic
    operation, and almost all architectures implement these as trivial
    wrappers around the underlying atomic. Specifically:

    * _inc_and_test(v) is (_inc_return(v) == 0)
    * _dec_and_test(v) is (_dec_return(v) == 0)
    * _sub_and_test(i, v) is (_sub_return(i, v) == 0)
    * _add_negative(i, v) is (_add_return(i, v) < 0)

    Rather than have these definitions duplicated in all architectures, with
    minor inconsistencies in formatting and documentation, let's make these
    operations optional, with default fallbacks as above. Implementations
    must now provide a preprocessor symbol.

    The instrumented atomics are updated accordingly.

    Both x86 and m68k have custom implementations, which are left as-is,
    given preprocessor symbols to avoid being overridden.

    There should be no functional change as a result of this patch.

    Signed-off-by: Mark Rutland
    Reviewed-by: Will Deacon
    Acked-by: Geert Uytterhoeven
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Palmer Dabbelt
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Link: https://lore.kernel.org/lkml/20180621121321.4761-16-mark.rutland@arm.com
    Signed-off-by: Ingo Molnar

    Mark Rutland
     
  • Several architectures these have a near-identical implementation based
    on atomic_read() and atomic_cmpxchg() which we can instead define in
    , so let's do so, using something close to the existing
    x86 implementation with try_cmpxchg().

    Where an architecture provides its own atomic_fetch_add_unless(), it
    must define a preprocessor symbol for it. The instrumented atomics are
    updated accordingly.

    Note that arch/arc's existing atomic_fetch_add_unless() had redundant
    barriers, as these are already present in its atomic_cmpxchg()
    implementation.

    There should be no functional change as a result of this patch.

    Signed-off-by: Mark Rutland
    Reviewed-by: Geert Uytterhoeven
    Reviewed-by: Will Deacon
    Acked-by: Geert Uytterhoeven
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Palmer Dabbelt
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Cc: Vineet Gupta
    Link: https://lore.kernel.org/lkml/20180621121321.4761-7-mark.rutland@arm.com
    Signed-off-by: Ingo Molnar

    Mark Rutland
     
  • While __atomic_add_unless() was originally intended as a building-block
    for atomic_add_unless(), it's now used in a number of places around the
    kernel. It's the only common atomic operation named __atomic*(), rather
    than atomic_*(), and for consistency it would be better named
    atomic_fetch_add_unless().

    This lack of consistency is slightly confusing, and gets in the way of
    scripting atomics. Given that, let's clean things up and promote it to
    an official part of the atomics API, in the form of
    atomic_fetch_add_unless().

    This patch converts definitions and invocations over to the new name,
    including the instrumented version, using the following script:

    ----
    git grep -w __atomic_add_unless | while read line; do
    sed -i '{s/\/atomic_fetch_add_unless/}' "${line%%:*}";
    done
    git grep -w __arch_atomic_add_unless | while read line; do
    sed -i '{s/\/arch_atomic_fetch_add_unless/}' "${line%%:*}";
    done
    ----

    Note that we do not have atomic{64,_long}_fetch_add_unless(), which will
    be introduced by later patches.

    There should be no functional change as a result of this patch.

    Signed-off-by: Mark Rutland
    Reviewed-by: Will Deacon
    Acked-by: Geert Uytterhoeven
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Palmer Dabbelt
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Link: https://lore.kernel.org/lkml/20180621121321.4761-2-mark.rutland@arm.com
    Signed-off-by: Ingo Molnar

    Mark Rutland
     
  • The sh implementation of pulls in
    so that it can refer to BITS_PER_BYTE. It also transitively relies on
    this pulling in for READ_ONCE().

    Replace the #include with and .

    Signed-off-by: Will Deacon
    Acked-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: yamada.masahiro@socionext.com
    Link: https://lore.kernel.org/lkml/1529412794-17720-6-git-send-email-will.deacon@arm.com
    Signed-off-by: Ingo Molnar

    Will Deacon
     
  • Clear current_kprobe and enable preemption in kprobe
    even if pre_handler returns !0.

    This simplifies function override using kprobes.

    Jprobe used to require to keep the preemption disabled and
    keep current_kprobe until it returned to original function
    entry. For this reason kprobe_int3_handler() and similar
    arch dependent kprobe handers checks pre_handler result
    and exit without enabling preemption if the result is !0.

    After removing the jprobe, Kprobes does not need to
    keep preempt disabled even if user handler returns !0
    anymore.

    But since the function override handler in error-inject
    and bpf is also returns !0 if it overrides a function,
    to balancing the preempt count, it enables preemption
    and reset current kprobe by itself.

    That is a bad design that is very buggy. This fixes
    such unbalanced preempt-count and current_kprobes setting
    in kprobes, bpf and error-inject.

    Note: for powerpc and x86, this removes all preempt_disable
    from kprobe_ftrace_handler because ftrace callbacks are
    called under preempt disabled.

    Signed-off-by: Masami Hiramatsu
    Acked-by: Thomas Gleixner
    Acked-by: Naveen N. Rao
    Cc: Alexei Starovoitov
    Cc: Ananth N Mavinakayanahalli
    Cc: Andrew Morton
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: David S. Miller
    Cc: Fenghua Yu
    Cc: Heiko Carstens
    Cc: James Hogan
    Cc: Josef Bacik
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Ralf Baechle
    Cc: Rich Felker
    Cc: Russell King
    Cc: Steven Rostedt
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Cc: linux-arch@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: linux-snps-arc@lists.infradead.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: sparclinux@vger.kernel.org
    Link: https://lore.kernel.org/lkml/152942494574.15209.12323837825873032258.stgit@devbox
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     
  • Don't call the ->break_handler() from the SH kprobes code,
    because it was only used by jprobes which got removed.

    Signed-off-by: Masami Hiramatsu
    Acked-by: Thomas Gleixner
    Cc: Ananth N Mavinakayanahalli
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Rich Felker
    Cc: Steven Rostedt
    Cc: Yoshinori Sato
    Cc: linux-arch@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Link: https://lore.kernel.org/lkml/152942488763.15209.7791710414058030809.stgit@devbox
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     
  • Remove arch dependent setjump/longjump functions
    and unused fields in kprobe_ctlblk for jprobes
    from arch/sh.

    Signed-off-by: Masami Hiramatsu
    Acked-by: Thomas Gleixner
    Cc: Ananth N Mavinakayanahalli
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Rich Felker
    Cc: Steven Rostedt
    Cc: Yoshinori Sato
    Cc: linux-arch@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Link: https://lore.kernel.org/lkml/152942456877.15209.5482537226935729621.stgit@devbox
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     

15 Jun, 2018

2 commits

  • Changeset 9919cba7ff71 ("watchdog: Update documentation") updated
    the documentation, removing the old nmi_watchdog.txt and adding
    a file with a new content.

    Update Kconfig files accordingly.

    Fixes: 9919cba7ff71 ("watchdog: Update documentation")

    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Jonathan Corbet

    Mauro Carvalho Chehab
     
  • HAVE_CC_STACKPROTECTOR should be selected by architectures with stack
    canary implementation. It is not about the compiler support.

    For the consistency with commit 050e9baa9dc9 ("Kbuild: rename
    CC_STACKPROTECTOR[_STRONG] config variables"), remove 'CC_' from the
    config symbol.

    I moved the 'select' lines to keep the alphabetical sorting.

    Signed-off-by: Masahiro Yamada
    Acked-by: Kees Cook
    Signed-off-by: Linus Torvalds

    Masahiro Yamada