1. 11 May, 2015 4 commits
    • Luis R. Rodriguez's avatar
      x86/mm: Add ioremap_uc() helper to map memory uncacheable (not UC-) · e4b6be33
      Luis R. Rodriguez authored
      ioremap_nocache() currently uses UC- by default. Our goal is to
      eventually make UC the default. Linux maps UC- to PCD=1, PWT=0
      page attributes on non-PAT systems. Linux maps UC to PCD=1,
      PWT=1 page attributes on non-PAT systems. On non-PAT and PAT
      systems a WC MTRR has different effects on pages with either of
      these attributes. In order to help with a smooth transition its
      best to enable use of UC (PCD,1, PWT=1) on a region as that
      ensures a WC MTRR will have no effect on a region, this however
      requires us to have an way to declare a region as UC and we
      currently do not have a way to do this.
      
        WC MTRR on non-PAT system with PCD=1, PWT=0 (UC-) yields WC.
        WC MTRR on non-PAT system with PCD=1, PWT=1 (UC)  yields UC.
      
        WC MTRR on PAT system with PCD=1, PWT=0 (UC-) yields WC.
        WC MTRR on PAT system with PCD=1, PWT=1 (UC)  yields UC.
      
      A flip of the default ioremap_nocache() behaviour from UC- to UC
      can therefore regress a memory region from effective memory type
      WC to UC if MTRRs are used. Use of MTRRs should be phased out
      and in the best case only arch_phys_wc_add() use will remain,
      even if this happens arch_phys_wc_add() will have an effect on
      non-PAT systems and changes to default ioremap_nocache()
      behaviour could regress drivers.
      
      Now, ideally we'd use ioremap_nocache() on the regions in which
      we'd need uncachable memory types and avoid any MTRRs on those
      regions. There are however some restrictions on MTRRs use, such
      as the requirement of having the base and size of variable sized
      MTRRs to be powers of two, which could mean having to use a WC
      MTRR over a large area which includes a region in which
      write-combining effects are undesirable.
      
      Add ioremap_uc() to help with the both phasing out of MTRR use
      and also provide a way to blacklist small WC undesirable regions
      in devices with mixed regions which are size-implicated to use
      large WC MTRRs. Use of ioremap_uc() helps phase out MTRR use by
      avoiding regressions with an eventual flip of default behaviour
      or ioremap_nocache() from UC- to UC.
      
      Drivers working with WC MTRRs can use the below table to review
      and consider the use of ioremap*() and similar helpers to ensure
      appropriate behaviour long term even if default
      ioremap_nocache() behaviour changes from UC- to UC.
      
      Although ioremap_uc() is being added we leave set_memory_uc() to
      use UC- as only initial memory type setup is required to be able
      to accommodate existing device drivers and phase out MTRR use.
      It should also be clarified that set_memory_uc() cannot be used
      with IO memory, even though its use will not return any errors,
      it really has no effect.
      
        ----------------------------------------------------------------------
        MTRR Non-PAT   PAT    Linux ioremap value        Effective memory type
        ----------------------------------------------------------------------
                                                          Non-PAT |  PAT
             PAT
             |PCD
             ||PWT
             |||
        WC   000      WB      _PAGE_CACHE_MODE_WB            WC   |   WC
        WC   001      WC      _PAGE_CACHE_MODE_WC            WC*  |   WC
        WC   010      UC-     _PAGE_CACHE_MODE_UC_MINUS      WC*  |   WC
        WC   011      UC      _PAGE_CACHE_MODE_UC            UC   |   UC
        ----------------------------------------------------------------------
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Davidlohr Bueso <dbueso@suse.de>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: Ville Syrjälä <syrjala@sci.fi>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: linux-fbdev@vger.kernel.org
      Link: http://lkml.kernel.org/r/1430343851-967-2-git-send-email-mcgrof@do-not-panic.com
      Link: http://lkml.kernel.org/r/1431332153-18566-9-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e4b6be33
    • Toshi Kani's avatar
      x86/mm/mtrr: Remove incorrect address check in __mtrr_type_lookup() · cd2f6a5a
      Toshi Kani authored
      __mtrr_type_lookup() checks MTRR fixed ranges when mtrr_state.have_fixed
      is set and start is less than 0x100000.
      
      However, the 'else if (start < 0x1000000)' in the code checks with an
      incorrect address as it has an extra-zero in the address.
      
      The code still runs correctly as this check is meaningless, though.
      
      This patch replaces the incorrect address check with 'else' with no
      condition.
      Signed-off-by: default avatarToshi Kani <toshi.kani@hp.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Elliott@hp.com
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: dave.hansen@intel.com
      Cc: linux-mm <linux-mm@kvack.org>
      Cc: pebolle@tiscali.nl
      Link: http://lkml.kernel.org/r/1427234921-19737-4-git-send-email-toshi.kani@hp.com
      Link: http://lkml.kernel.org/r/1431332153-18566-8-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      cd2f6a5a
    • Ross Zwisler's avatar
      x86/mm: Add kerneldoc comments for pcommit_sfence() · ca7d9b79
      Ross Zwisler authored
      Add kerneldoc comments for pcommit_sfence() describing the
      purpose of the PCOMMIT instruction and demonstrating its usage
      with an example.
      Signed-off-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H Peter Anvin <h.peter.anvin@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Link: http://lkml.kernel.org/r/1430261196-2401-1-git-send-email-ross.zwisler@linux.intel.com
      Link: http://lkml.kernel.org/r/1431332153-18566-7-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ca7d9b79
    • Ross Zwisler's avatar
      x86/mm: Do not flush last cacheline twice in clflush_cache_range() · 6c434d61
      Ross Zwisler authored
      The current algorithm used in clflush_cache_range() can cause
      the last cache line of the buffer to be flushed twice. Fix that
      algorithm so that each cache line will only be flushed once.
      Reported-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Luis R. Rodriguez <mcgrof@suse.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Link: http://lkml.kernel.org/r/1430259192-18802-1-git-send-email-ross.zwisler@linux.intel.com
      Link: http://lkml.kernel.org/r/1431332153-18566-5-git-send-email-bp@alien8.de
      [ Changed it to 'void *' to simplify the type conversions. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      6c434d61
  2. 10 May, 2015 6 commits
    • Linus Torvalds's avatar
      Linux 4.1-rc3 · 030bbdbf
      Linus Torvalds authored
      030bbdbf
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 01d07351
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "I really need to get back to sending these on my Friday, instead of my
        Monday morning, but nothing too amazing in here: a few amdkfd fixes, a
        few radeon fixes, i915 fixes, one tegra fix and one core fix"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm: Zero out invalid vblank timestamp in drm_update_vblank_count.
        drm/tegra: Don't use vblank_disable_immediate on incapable driver.
        drm/radeon: stop trying to suspend UVD sessions
        drm/radeon: more strictly validate the UVD codec
        drm/radeon: make UVD handle checking more strict
        drm/radeon: make VCE handle check more strict
        drm/radeon: fix userptr lockup
        drm/radeon: fix userptr BO unpin bug v3
        drm/amdkfd: Initialize sdma vm when creating sdma queue
        drm/amdkfd: Don't report local memory size
        drm/amdkfd: allow unregister process with queues
        drm/i915: Drop PIPE-A quirk for 945GSE HP Mini
        drm/i915: Sink rate read should be saved in deca-kHz
        drm/i915/dp: there is no audio on port A
        drm/i915: Add missing MacBook Pro models with dual channel LVDS
        drm/i915: Assume dual channel LVDS if pixel clock necessitates it
        drm/radeon: don't setup audio on asics that don't support it
        drm/radeon: disable semaphores for UVD V1 (v2)
      01d07351
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2015-05-08' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 332545b3
      Dave Airlie authored
      misc i915 fixes.
      
      * tag 'drm-intel-fixes-2015-05-08' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Drop PIPE-A quirk for 945GSE HP Mini
        drm/i915: Sink rate read should be saved in deca-kHz
        drm/i915/dp: there is no audio on port A
        drm/i915: Add missing MacBook Pro models with dual channel LVDS
        drm/i915: Assume dual channel LVDS if pixel clock necessitates it
      332545b3
    • Mario Kleiner's avatar
      drm: Zero out invalid vblank timestamp in drm_update_vblank_count. · fdb68e09
      Mario Kleiner authored
      Since commit 844b03f2 we make
      sure that after vblank irq off, we return the last valid
      (vblank count, vblank timestamp) pair to clients, e.g., during
      modesets, which is good.
      
      An overlooked side effect of that commit for kms drivers without
      support for precise vblank timestamping is that at vblank irq
      enable, when we update the vblank counter from the hw counter, we
      can't update the corresponding vblank timestamp, so now we have a
      totally mismatched timestamp for the new count to confuse clients.
      
      Restore old client visible behaviour from before Linux 3.17, but
      zero out the timestamp at vblank counter update (instead of disable
      as in original implementation) if we can't generate a meaningful
      timestamp immediately for the new vblank counter. This will fix
      this regression, so callers know they need to retry again later
      if they need a valid timestamp, but at the same time preserves
      the improvements made in the commit mentioned above.
      Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: <stable@vger.kernel.org> #v3.17+
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      fdb68e09
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 41f2a93c
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A set of ARM fixes:
      
         - fix an off-by-one error in the iommu DMA ops, which caused errors
           with a 4GiB size.
      
         - remove comments mentioning the non-existent CONFIG_CPU_ARM1020_CPU_IDLE
           macro.
      
         - remove useless CONFIG_CPU_ICACHE_STREAMING_DISABLE blocks, where
           this symbol never appeared in any Kconfig.
      
         - fix Feroceon code to cope with a previous change correctly (it
           incorrectly left an additional word in an assembly structure
           definition)
      
         - avoid a misleading IRQ affinity warning in the ARM PMU code for
           IRQs which are already affine to their CPUs.
      
         - fix the node name printed in the IRQ affinity warning"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8352/1: perf: Fix the pmu node name in warning message
        ARM: 8351/1: perf: don't warn about missing interrupt-affinity property for PPIs
        ARM: 8350/1: proc-feroceon: Fix feroceon_proc_info macro
        ARM: 8349/1: arch/arm/mm/proc-arm925.S: remove dead #ifdef block
        ARM: 8348/1: remove comments on CPU_ARM1020_CPU_IDLE
        ARM: 8347/1: dma-mapping: fix off-by-one check in arm_setup_iommu_dma_ops
      41f2a93c
    • Linus Torvalds's avatar
      Merge tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung · 8425ac7a
      Linus Torvalds authored
      Pull samsung fixes from Kukjin Kim:
       "Here is Samsung fixes for v4.1.  Since I've missed to send this via
        arm-soc tree before v4.1-rc3, so I'm sending this to you directly
      
         - fix commit ea08de16 ("ARM: dts: Add DISP1 power domain for
           exynos5420") which causes 'unhandled fault: imprecise external
           abort' error when PD turned off.  ("make DP a consumer of DISP1
           power domain")
      
         - fix 's3c-rtc' probe failure on Odriod-X2/U2/U3 boards ("add
           'rtc_src' clock to rtc node for source clock of rtc")
      
         - fix typo for 'cpu-crit-0' trip point on exynos5420/5440
      
         - fix S2R failure on exynos5250-snow due to card power of Marvell
           WiFi driver (suspend/resume) ("add keep-power-in-susped to WiFi
           SDIO node")"
      
      * tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
        ARM: dts: Add keep-power-in-suspend to WiFi SDIO node for exynos5250-snow
        ARM: dts: Fix typo in trip point temperature for exynos5420/5440
        ARM: dts: add 'rtc_src' clock to rtc node for exynos4412-odroid boards
        ARM: dts: Make DP a consumer of DISP1 power domain on Exynos5420
      8425ac7a
  3. 09 May, 2015 15 commits
  4. 08 May, 2015 11 commits
  5. 07 May, 2015 4 commits
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 3e0283a5
      Linus Torvalds authored
      Pull power management and ACPI fixes from Rafael Wysocki:
       "These include three regression fixes (PCI resources management,
        ACPI/PNP device enumeration, ACPI SBS on MacBook) and two ACPI
        documentation fixes related to GPIO.
      
        Specifics:
      
         - Fix for a PCI resources management regression introduced during the
           4.0 cycle and related to the handling of ACPI resources'
           Producer/Consumer flags that turn out to be useless (Jiang Liu)
      
         - Fix for a MacBook regression related to the Smart Battery Subsystem
           (SBS) driver causing various problems (stalls on boot, failure to
           detect or report battery) to happen and introduced during the 3.18
           cycle (Chris Bainbridge)
      
         - Fix for an ACPI/PNP device enumeration regression introduced during
           the 3.16 cycle caused by failing to include two PNP device IDs into
           the list of IDs that PNP device objects need to be created for
           (Witold Szczeponik)
      
         - Fixes for two minor mistakes in the ACPI GPIO properties
           documentation (Antonio Ospite, Rafael J Wysocki)"
      
      * tag 'pm+acpi-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / PNP: add two IDs to list for PNPACPI device enumeration
        ACPI / documentation: Fix ambiguity in the GPIO properties document
        ACPI / documentation: fix a sentence about GPIO resources
        ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook
        x86/PCI/ACPI: Make all resources except [io 0xcf8-0xcff] available on PCI bus
      3e0283a5
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-resources', 'acpi-battery', 'acpi-doc' and 'acpi-pnp' · 9a5d9315
      Rafael J. Wysocki authored
      * acpi-resources:
        x86/PCI/ACPI: Make all resources except [io 0xcf8-0xcff] available on PCI bus
      
      * acpi-battery:
        ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook
      
      * acpi-doc:
        ACPI / documentation: Fix ambiguity in the GPIO properties document
        ACPI / documentation: fix a sentence about GPIO resources
      
      * acpi-pnp:
        ACPI / PNP: add two IDs to list for PNPACPI device enumeration
      9a5d9315
    • Linus Torvalds's avatar
      Merge tag 'for-f2fs-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 68c2f356
      Linus Torvalds authored
      Pull f2fs fixes from Jaegeuk Kim:
       "Fix a performance regression and a bug"
      
      * tag 'for-f2fs-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
        f2fs: fix wrong error hanlder in f2fs_follow_link
        Revert "f2fs: enhance multi-threads performance"
      68c2f356
    • Fabio Estevam's avatar
      ARM: multi_v7_defconfig: Select more FSL SoCs · dc0e3db4
      Fabio Estevam authored
      Select IMX50, IMX6SX and LS1021A SoC support.
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      dc0e3db4