14 Apr, 2016

8 commits


06 Apr, 2016

4 commits


05 Apr, 2016

11 commits

  • Pull media fixes from Mauro Carvalho Chehab:
    "Some bug fixes on au0828 and snd-usb-audio:

    - the au0828+snd-usb-audio MC patch broke several things and produced
    some race conditions. Better to revert the patches, and re-work on
    them for a next version

    - fix a regression at tuner disable links logic

    - properly handle dev_state as a bitmask"

    * tag 'media/v4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] Revert "[media] media: au0828 change to use Managed Media Controller API"
    [media] Revert "[media] sound/usb: Use Media Controller API to share media resources"
    [media] au0828: Fix dev_state handling
    [media] au0828: fix au0828_v4l2_close() dev_state race condition
    [media] media: au0828 fix to clear enable/disable/change source handlers
    [media] v4l2-mc: cleanup a warning
    [media] au0828: disable tuner links and cache tuner/decoder

    Linus Torvalds
     
  • …/git/shuah/linux-kselftest

    Pull kselftest fixes from Shuah Khan:
    "This update for Kselftest contains seccomp fixes"

    * tag 'linux-kselftest-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
    selftest/seccomp: Fix the seccomp(2) signature
    selftest/seccomp: Fix the flag name SECCOMP_FILTER_FLAG_TSYNC

    Linus Torvalds
     
  • Pull MIPS fixes from Ralf Baechle:
    "This is the first round of MIPS fixes for 4.6:

    - Fix spelling mistakes all over arch/mips
    - Provide __bswapsi2 so XZ kernel compression will build with older GCC
    - ATH79 clock fixes.
    - Fix clock-rated copy-paste erros in ATH79 DTS.
    - Fix gisb-arb compatible string for 7435 BMIPS
    - Enable NAND and UBIFS support in CI20.
    - Fix BUG() assertion caused by inapropriate smp_processor_id() use.
    - Fix exception handling issues for the sake of debuggers
    - Fix the last remaining instance of irq_to_gpio in the db1xxx_ss PCMCIA code
    - Fix MSA unaligned load failures
    - Panic if kernel is configured for a not TLB-supported page size
    - Bail out on unsupported relocs in modules.
    - Partial fix for Qemu breakage after recent IPI rewrite
    - Wire up the preadv2 and pwrite2 syscalls
    - Fix the ar724x clock calculation"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: traps.c: Verify the ISA for microMIPS RDHWR emulation
    MIPS: BMIPS: Fix gisb-arb compatible string for 7435
    MIPS: Bail on unsupported module relocs
    MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: use "ref" for reference clock name
    MIPS: ath79: Fix the ar913x reference clock rate
    MIPS: ath79: Fix the ar724x clock calculation
    dt-bindings: clock: qca,ath79-pll: fix copy-paste typos
    MIPS: traps: Correct the SIGTRAP debug ABI in `do_watch' and `do_trap_or_bp'
    FIRMWARE: Broadcom: Fix grammar of warning messages in bcm47xx_sprom.c.
    MIPS: ci20: Enable NAND and UBIFS support in defconfig.
    MIPS: Fix misspellings in comments.
    MIPS: tlb-r4k: panic if the MMU doesn't support PAGE_SIZE
    MIPS: zboot: Remove copied source files on clean
    MIPS: zboot: Fix the build with XZ compression on older GCC versions
    MIPS: Wire up preadv2 and pwrite2 syscalls.
    MIPS: cpu_name_string: Use raw_smp_processor_id().
    pcmcia: db1xxx_ss: fix last irq_to_gpio user
    MIPS: Fix MSA ld unaligned failure cases
    MIPS: Fix broken malta qemu

    Linus Torvalds
     
  • Pull xen fixes from David Vrabel:
    "Regression and bug fixes for 4.6-rc2:

    - safely migrate event channels between CPUs
    - fix CPU hotplug
    - maintainer changes"

    * tag 'for-linus-4.6-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    MAINTAINERS: xen: Konrad to step down and Juergen to pick up
    xen/events: Mask a moving irq
    Xen on ARM and ARM64: update MAINTAINERS info
    xen/x86: Call cpu_startup_entry(CPUHP_AP_ONLINE_IDLE) from xen_play_dead()
    xen/apic: Provide Xen-specific version of cpu_present_to_apicid APIC op

    Linus Torvalds
     
  • Pull quota fixes from Jan Kara:
    "Fixes for oopses when the new quotactl gets used with quotas disabled"

    * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    ocfs2: Fix Q_GETNEXTQUOTA for filesystem without quotas
    quota: Handle Q_GETNEXTQUOTA when quota is disabled

    Linus Torvalds
     
  • Pull f2fs fixes from Jaegeuk Kim.

    * tag 'f2fs-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
    f2fs: retrieve IO write stat from the right place
    f2fs crypto: fix corrupted symlink in encrypted case
    f2fs: cover large section in sanity check of super

    Linus Torvalds
     
  • In commit e45708976aea ("drm/dp-helper: Move the legacy helpers to
    gma500") the legacy i2c helpers were moved to the only remaining user of
    them, the gma500 driver. Together with that move, i2c_dp_aux_add_bus()
    was marked deprecated and started warning about its remaining use.

    It's now been a year and a half of annoying warning, and apparently
    nobody cares enough about gma500 to try to move it along to the more
    modern models.

    Get rid of the warning - if even the gma500 people don't care enough,
    then they should certainly not spam other innocent developers with a
    warning that might hide other, much more real issues.

    Cc: Daniel Vetter
    Cc: Alan Cox
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Merge PAGE_CACHE_SIZE removal patches from Kirill Shutemov:
    "PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
    ago with promise that one day it will be possible to implement page
    cache with bigger chunks than PAGE_SIZE.

    This promise never materialized. And unlikely will.

    Let's stop pretending that pages in page cache are special. They are
    not.

    The first patch with most changes has been done with coccinelle. The
    second is manual fixups on top.

    The third patch removes macros definition"

    [ I was planning to apply this just before rc2, but then I spaced out,
    so here it is right _after_ rc2 instead.

    As Kirill suggested as a possibility, I could have decided to only
    merge the first two patches, and leave the old interfaces for
    compatibility, but I'd rather get it all done and any out-of-tree
    modules and patches can trivially do the converstion while still also
    working with older kernels, so there is little reason to try to
    maintain the redundant legacy model. - Linus ]

    * PAGE_CACHE_SIZE-removal:
    mm: drop PAGE_CACHE_* and page_cache_{get,release} definition
    mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage
    mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros

    Linus Torvalds
     
  • All users gone. We can remove these macros.

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     
  • Mostly direct substitution with occasional adjustment or removing
    outdated comments.

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     
  • PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
    ago with promise that one day it will be possible to implement page
    cache with bigger chunks than PAGE_SIZE.

    This promise never materialized. And unlikely will.

    We have many places where PAGE_CACHE_SIZE assumed to be equal to
    PAGE_SIZE. And it's constant source of confusion on whether
    PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
    especially on the border between fs and mm.

    Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
    breakage to be doable.

    Let's stop pretending that pages in page cache are special. They are
    not.

    The changes are pretty straight-forward:

    - << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};

    - page_cache_get() -> get_page();

    - page_cache_release() -> put_page();

    This patch contains automated changes generated with coccinelle using
    script below. For some reason, coccinelle doesn't patch header files.
    I've called spatch for them manually.

    The only adjustment after coccinelle is revert of changes to
    PAGE_CAHCE_ALIGN definition: we are going to drop it later.

    There are few places in the code where coccinelle didn't reach. I'll
    fix them manually in a separate patch. Comments and documentation also
    will be addressed with the separate patch.

    virtual patch

    @@
    expression E;
    @@
    - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    expression E;
    @@
    - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    @@
    - PAGE_CACHE_SHIFT
    + PAGE_SHIFT

    @@
    @@
    - PAGE_CACHE_SIZE
    + PAGE_SIZE

    @@
    @@
    - PAGE_CACHE_MASK
    + PAGE_MASK

    @@
    expression E;
    @@
    - PAGE_CACHE_ALIGN(E)
    + PAGE_ALIGN(E)

    @@
    expression E;
    @@
    - page_cache_get(E)
    + get_page(E)

    @@
    expression E;
    @@
    - page_cache_release(E)
    + put_page(E)

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

04 Apr, 2016

4 commits

  • Make sure it's the microMIPS rather than MIPS16 ISA before emulating
    microMIPS RDHWR. Mostly needed as an optimisation for configurations
    where `cpu_has_mmips' is hardcoded to 0 and also a good measure in case
    we add further microMIPS instructions to emulate in the future, as the
    corresponding MIPS16 encoding is ADDIUSP, not supposed to trap.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12282/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • The SUN GISB arbiter was added with the wrong compatible string, leading to
    using the wrong register layout, use the correct compatible string for this
    chip: brcm,bcm7435-gisb-arb.

    Fixes: 8394968be4c7 ("MIPS: BMIPS: Add BCM7435 dtsi")
    Signed-off-by: Florian Fainelli
    Cc: blogic@openwrt.org
    Cc: cernekee@gmail.com
    Cc: jogo@openwrt.org
    Cc: jaedon.shin@gmail.com
    Cc: pgynther@google.com
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12285/
    Signed-off-by: Ralf Baechle

    Florian Fainelli
     
  • I've lately been concentrating on other projects and haven't been
    doing much of Xen core maintainership for the last year.

    I am quite thrilled that Juergen is willing to help out!

    P.S.
    I am still the maintainer of Xen-SWIOTLB, Xen PCI-[front|backend],
    and co-maintainer of Xen block-[front|backend]; amongst others.

    Acked-by: Juergen Gross
    Acked-by: Boris Ostrovsky
    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: David Vrabel

    Konrad Rzeszutek Wilk
     
  • Moving an unmasked irq may result in irq handler being invoked on both
    source and target CPUs.

    With 2-level this can happen as follows:

    On source CPU:
    evtchn_2l_handle_events() ->
    generic_handle_irq() ->
    handle_edge_irq() ->
    eoi_pirq():
    irq_move_irq(data);

    /***** WE ARE HERE *****/

    if (VALID_EVTCHN(evtchn))
    clear_evtchn(evtchn);

    If at this moment target processor is handling an unrelated event in
    evtchn_2l_handle_events()'s loop it may pick up our event since target's
    cpu_evtchn_mask claims that this event belongs to it *and* the event is
    unmasked and still pending. At the same time, source CPU will continue
    executing its own handle_edge_irq().

    With FIFO interrupt the scenario is similar: irq_move_irq() may result
    in a EVTCHNOP_unmask hypercall which, in turn, may make the event
    pending on the target CPU.

    We can avoid this situation by moving and clearing the event while
    keeping event masked.

    Signed-off-by: Boris Ostrovsky
    Cc: stable@vger.kernel.org
    Signed-off-by: David Vrabel

    Boris Ostrovsky
     

03 Apr, 2016

13 commits

  • Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Misc kernel side fixes:

    - fix event leak
    - fix AMD PMU driver bug
    - fix core event handling bug
    - fix build bug on certain randconfigs

    Plus misc tooling fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/amd/ibs: Fix pmu::stop() nesting
    perf/core: Don't leak event in the syscall error path
    perf/core: Fix time tracking bug with multiplexing
    perf jit: genelf makes assumptions about endian
    perf hists: Fix determination of a callchain node's childlessness
    perf tools: Add missing initialization of perf_sample.cpumode in synthesized samples
    perf tools: Fix build break on powerpc
    perf/x86: Move events_sysfs_show() outside CPU_SUP_INTEL
    perf bench: Fix detached tarball building due to missing 'perf bench memcpy' headers
    perf tests: Fix tarpkg build test error output redirection

    Linus Torvalds
     
  • Pull core kernel fixes from Ingo Molnar:
    "This contains the nohz/atomic cleanup/fix for the fetch_or() ugliness
    you noted during the original nohz pull request, plus there's also
    misc fixes:

    - fix liblockdep build bug
    - fix uapi header build bug
    - print more lockdep hash collision info to help debug recent reports
    of hash collisions
    - update MAINTAINERS email address"

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    MAINTAINERS: Update my email address
    locking/lockdep: Print chain_key collision information
    uapi/linux/stddef.h: Provide __always_inline to userspace headers
    tools/lib/lockdep: Fix unsupported 'basename -s' in run_tests.sh
    locking/atomic, sched: Unexport fetch_or()
    timers/nohz: Convert tick dependency mask to atomic_t
    locking/atomic: Introduce atomic_fetch_or()

    Linus Torvalds
     
  • Commit 840f5b0572ea ("media: au0828 disable tuner to demod link in
    au0828_media_device_register()") removed all uses of the 'dtv_demod',
    but left the variable itself around.

    Remove it.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull x86 fixes from Thomas Gleixner:
    "This lot contains:

    - Some fixups for the fallout of the topology consolidation which
    unearthed AMD/Intel inconsistencies
    - Documentation for the x86 topology management
    - Support for AMD advanced power management bits
    - Two simple cleanups removing duplicated code"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/cpu: Add advanced power management bits
    x86/thread_info: Merge two !__ASSEMBLY__ sections
    x86/cpufreq: Remove duplicated TDP MSR macro definitions
    x86/Documentation: Start documenting x86 topology
    x86/cpu: Get rid of compute_unit_id
    perf/x86/amd: Cleanup Fam10h NB event constraints
    x86/topology: Fix AMD core count

    Linus Torvalds
     
  • When an unsupported reloc is encountered in a module, we currently
    blindly branch to whatever would be at its entry in the reloc handler
    function pointer arrays. This may be NULL, or if the unsupported reloc
    has a type greater than that of the supported reloc with the highest
    type then we'll dereference some value after the function pointer array
    & branch to that. The result is at best a kernel oops.

    Fix this by checking that the reloc type has an entry in the function
    pointer array (ie. is less than the number of items in the array) and
    that the handler is non-NULL, returning an error code to fail the module
    load if no handler is found.

    Signed-off-by: Paul Burton
    Cc: James Hogan
    Cc: Steven J. Hill
    Cc: Andrey Ryabinin
    Cc: Andrew Morton
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/12432/
    Signed-off-by: Ralf Baechle

    Paul Burton
     
  • Current ath79 clock.c code does not read reference clock and
    pll setup from devicetree. The ar724x_clocks_init() function
    recreates the clocks from scratch so devicetree clock
    information is dropped. After adding the code which picked up
    reference clock from devicetree I have found
    that kernel does not boot anymore. The SPI and UART drivers
    can't get clk; here are the bootlog error messages:

    of_serial: probe of 18020000.uart failed with error -22
    ath79-spi: probe of 1f000000.spi failed with error -22

    The problem is that clock code assumes that reference clock
    name is "ref" but current dts-file uses another name: "oscillator".

    This patch fixes the problem by changing external oscillator
    dt node name to "ref".

    Please note that there is an alternative solution for the problem:

    > --- a/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
    > +++ b/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
    > @@ -16,6 +16,7 @@
    >
    > extosc: oscillator {
    > compatible = "fixed-clock";
    > + clock-output-names = "ref";
    > #clock-cells = ;
    > clock-frequency = ;
    > };

    Signed-off-by: Antony Pavlov
    Cc: Alban Bedel
    Cc: Michael Turquette
    Cc: Rob Herring
    Cc: linux-clk@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: devicetree@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/12874/
    Signed-off-by: Ralf Baechle

    Antony Pavlov
     
  • The reference clock on ar913x is at 40MHz and not 5MHz. The current
    implementation use the wrong reference rate because it doesn't take
    the PLL divider in account. But if we fix the code to use the divider
    it becomes identical with the implementation for ar724x, so just drop
    the broken ar913x implementation.

    Signed-off-by: Alban Bedel
    Tested-by: Antony Pavlov
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12871/
    Signed-off-by: Ralf Baechle

    Alban Bedel
     
  • According to the AR7242 datasheet section 2.8, AR724X CPUs use a 40MHz
    input clock as the REF_CLK instead of 5MHz.

    The correct CPU PLL calculation procedure is as follows:
    CPU_PLL = (FB * REF_CLK) / REF_DIV / 2.

    This patch is compatible with the current calculation procedure with
    default FB and REF_DIV values.

    Tested on AR7240, AR7241 and AR7242.

    Signed-off-by: Weijie Gao
    Signed-off-by: Alban Bedel (Fixed the commit log message)
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12870/
    Signed-off-by: Ralf Baechle

    Weijie Gao
     
  • Signed-off-by: Antony Pavlov
    Acked-by: Rob Herring
    Cc: Alban Bedel
    Cc: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Cc: devicetree@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/12869/
    Signed-off-by: Ralf Baechle

    Antony Pavlov
     
  • Follow our own rules set in for SIGTRAP signals issued
    from `do_watch' and `do_trap_or_bp' by setting the signal code to
    TRAP_HWBKPT and TRAP_BRKPT respectively, for Watch exceptions and for
    those Breakpoint exceptions whose originating BREAK instruction's code
    does not have a special meaning. Keep Trap exceptions unaffected as
    these are not debug events.

    No existing user software is expected to examine signal codes for these
    signals as SI_KERNEL has been always used here. This change makes the
    MIPS port more like other Linux ports, which reduces the complexity and
    provides for performance improvement in GDB.

    Signed-off-by: Maciej W. Rozycki
    Cc: Pedro Alves
    Cc: Luis Machado
    Cc: linux-mips@linux-mips.org
    Cc: gdb@sourceware.org
    Patchwork: https://patchwork.linux-mips.org/patch/12758/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • Update the Ci20's defconfig to enable the JZ4780's NAND driver and
    therefore access to the UBIFS rootfs.

    Signed-off-by: Harvey Hunt
    Cc: Paul Burton
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/12699/
    Signed-off-by: Ralf Baechle

    Harvey Hunt