1. 07 6月, 2015 1 次提交
    • B
      x86: Kill CONFIG_X86_HT · c8e56d20
      Borislav Petkov 提交于
      In talking to Aravind recently about making certain AMD topology
      attributes available to the MCE injection module, it seemed like
      that CONFIG_X86_HT thing is more or less superfluous. It is
      def_bool y, depends on SMP and gets enabled in the majority of
      .configs - distro and otherwise - out there.
      
      So let's kill it and make code behind it depend directly on SMP.
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Daniel Walter <dwalter@google.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Jacob Shin <jacob.w.shin@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1433436928-31903-18-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c8e56d20
  2. 03 6月, 2015 1 次提交
    • I
      x86/kconfig: Reorganize arch feature Kconfig select's · 6471b825
      Ingo Molnar 提交于
      Peter Zijstra noticed that in arch/x86/Kconfig there are a lot
      of X86_{32,64} clauses in the X86 symbol, plus there are a number
      of similar selects in the X86_32 and X86_64 config definitions
      as well - which all overlap in an inconsistent mess.
      
      So:
      
        - move all select's from X86_32 and X86_64 to the X64 config
          option
      
        - sort their names, so that duplications are easier to spot
      
        - align their if clauses, so that they are easier to identify
          at a glance - and so that weirdnesses stand out more
      
      No change in functionality:
      
           105 insertions(+)
           105 deletions(-)
      
      Originally-from: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20150602153027.GU3644@twins.programming.kicks-ass.netSigned-off-by: NIngo Molnar <mingo@kernel.org>
      6471b825
  3. 01 6月, 2015 3 次提交
  4. 30 5月, 2015 3 次提交
  5. 29 5月, 2015 1 次提交
  6. 28 5月, 2015 3 次提交
  7. 27 5月, 2015 23 次提交
    • L
      x86/mm/pat: Export pat_enabled() · fbe7193a
      Luis R. Rodriguez 提交于
      Two Linux device drivers cannot work with PAT and the work
      required to make them work is significant. There is not enough
      motivation to convert these drivers over to use PAT properly,
      the compromise reached is to let drivers that cannot be ported
      to PAT check if PAT was enabled and if so fail on probe with a
      recommendation to boot with the "nopat" kernel parameter.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Walls <awalls@md.metrocast.net>
      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: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1430425520-22275-4-git-send-email-mcgrof@do-not-panic.com
      Link: http://lkml.kernel.org/r/1432628901-18044-14-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      fbe7193a
    • L
      x86/mm/pat: Wrap pat_enabled into a function API · cb32edf6
      Luis R. Rodriguez 提交于
      We use pat_enabled in x86-specific code to see if PAT is enabled
      or not but we're granting full access to it even though readers
      do not need to set it. If, for instance, we granted access to it
      to modules later they then could override the variable
      setting... no bueno.
      
      This renames pat_enabled to a new static variable __pat_enabled.
      Folks are redirected to use pat_enabled() now.
      
      Code that sets this can only be internal to pat.c. Apart from
      the early kernel parameter "nopat" to disable PAT, we also have
      a few cases that disable it later and make use of a helper
      pat_disable(). It is wrapped under an ifdef but since that code
      cannot run unless PAT was enabled its not required to wrap it
      with ifdefs, unwrap that. Likewise, since "nopat" doesn't really
      change non-PAT systems just remove that ifdef as well.
      
      Although we could add and use an early_param_off(), these
      helpers don't use __read_mostly but we want to keep
      __read_mostly for __pat_enabled as this is a hot path -- upon
      boot, for instance, a simple guest may see ~4k accesses to
      pat_enabled(). Since __read_mostly early boot params are not
      that common we don't add a helper for them just yet.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Walls <awalls@md.metrocast.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Kyle McMartin <kyle@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1430425520-22275-3-git-send-email-mcgrof@do-not-panic.com
      Link: http://lkml.kernel.org/r/1432628901-18044-13-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      cb32edf6
    • L
      x86/mm/mtrr: Generalize runtime disabling of MTRRs · f9626104
      Luis R. Rodriguez 提交于
      It is possible to enable CONFIG_MTRR and CONFIG_X86_PAT and end
      up with a system with MTRR functionality disabled but PAT
      functionality enabled. This can happen, for instance, when the
      Xen hypervisor is used where MTRRs are not supported but PAT is.
      This can happen on Linux as of commit
      
        47591df5 ("xen: Support Xen pv-domains using PAT")
      
      by Juergen, introduced in v3.19.
      
      Technically, we should assume the proper CPU bits would be set
      to disable MTRRs but we can't always rely on this. At least on
      the Xen Hypervisor, for instance, only X86_FEATURE_MTRR was
      disabled as of Xen 4.4 through Xen commit 586ab6a [0], but not
      X86_FEATURE_K6_MTRR, X86_FEATURE_CENTAUR_MCR, or
      X86_FEATURE_CYRIX_ARR for instance.
      
      Roger Pau Monné has clarified though that although this is
      technically true we will never support PVH on these CPU types so
      Xen has no need to disable these bits on those systems. As per
      Roger, AMD K6, Centaur and VIA chips don't have the necessary
      hardware extensions to allow running PVH guests [1].
      
      As per Toshi it is also possible for the BIOS to disable MTRR
      support, in such cases get_mtrr_state() would update the MTRR
      state as per the BIOS, we need to propagate this information as
      well.
      
      x86 MTRR code relies on quite a bit of checks for mtrr_if being
      set to check to see if MTRRs did get set up. Instead, lets
      provide a generic getter for that. This also adds a few checks
      where they were not before which could potentially safeguard
      ourselves against incorrect usage of MTRR where this was not
      desirable.
      
      Where possible match error codes as if MTRRs were disabled on
      arch/x86/include/asm/mtrr.h.
      
      Lastly, since disabling MTRRs can happen at run time and we
      could end up with PAT enabled, best record now in our logs when
      MTRRs are disabled.
      
      [0] ~/devel/xen (git::stable-4.5)$ git describe --contains 586ab6a 4.4.0-rc1~18
      [1] http://lists.xenproject.org/archives/html/xen-devel/2015-03/msg03460.htmlSigned-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Antonino Daplas <adaplas@gmail.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: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Davidlohr Bueso <dbueso@suse.de>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.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: Peter Zijlstra <peterz@infradead.org>
      Cc: Roger Pau Monné <roger.pau@citrix.com>
      Cc: Stefan Bader <stefan.bader@canonical.com>
      Cc: Suresh Siddha <sbsiddha@gmail.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: bhelgaas@google.com
      Cc: david.vrabel@citrix.com
      Cc: jbeulich@suse.com
      Cc: konrad.wilk@oracle.com
      Cc: venkatesh.pallipadi@intel.com
      Cc: ville.syrjala@linux.intel.com
      Cc: xen-devel@lists.xensource.com
      Link: http://lkml.kernel.org/r/1426893517-2511-3-git-send-email-mcgrof@do-not-panic.com
      Link: http://lkml.kernel.org/r/1432628901-18044-12-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      f9626104
    • L
      x86/mm/mtrr: Avoid #ifdeffery with phys_wc_to_mtrr_index() · 7d010fdf
      Luis R. Rodriguez 提交于
      There is only one user but since we're going to bury MTRR next
      out of access to drivers, expose this last piece of API to
      drivers in a general fashion only needing io.h for access to
      helpers.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Abhilash Kesavan <a.kesavan@samsung.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Cristian Stoica <cristian.stoica@freescale.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Davidlohr Bueso <dbueso@suse.de>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Mel Gorman <mgorman@suse.de>
      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: dri-devel@lists.freedesktop.org
      Link: http://lkml.kernel.org/r/1429722736-4473-1-git-send-email-mcgrof@do-not-panic.com
      Link: http://lkml.kernel.org/r/1432628901-18044-11-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      7d010fdf
    • L
      x86/mm/mtrr, pat: Document Write Combining MTRR type effects on PAT / non-PAT pages · 2f9e8973
      Luis R. Rodriguez 提交于
      As part of the effort to phase out MTRR use document
      write-combining MTRR effects on pages with different non-PAT
      page attributes flags and different PAT entry values. Extend
      arch_phys_wc_add() documentation to clarify power of two sizes /
      boundary requirements as we phase out mtrr_add() use.
      
      Lastly hint towards ioremap_uc() for corner cases on device
      drivers working with devices with mixed regions where MTRR size
      requirements would otherwise not enable write-combining
      effective memory types.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Antonino Daplas <adaplas@gmail.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: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Davidlohr Bueso <dbueso@suse.de>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Suresh Siddha <sbsiddha@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Ville Syrjälä <syrjala@sci.fi>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: linux-fbdev@vger.kernel.org
      Link: http://lkml.kernel.org/r/1430343851-967-3-git-send-email-mcgrof@do-not-panic.com
      Link: http://lkml.kernel.org/r/1432628901-18044-10-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      2f9e8973
    • L
      x86/mm/pat: Convert to pr_*() usage · 9e76561f
      Luis R. Rodriguez 提交于
      Use pr_info() instead of the old printk to prefix the component
      where things are coming from. With this readers will know
      exactly where the message is coming from. We use pr_* helpers
      but define pr_fmt to the empty string for easier grepping for
      those error messages.
      
      We leave the users of dprintk() in place, this will print only
      when the debugpat kernel parameter is enabled. We want to leave
      those enabled as a debug feature, but also make them use the
      same prefix.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      [ Kill pr_fmt. ]
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Walls <awalls@md.metrocast.net>
      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: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: cocci@systeme.lip6.fr
      Cc: plagnioj@jcrosoft.com
      Cc: tomi.valkeinen@ti.com
      Link: http://lkml.kernel.org/r/1430425520-22275-2-git-send-email-mcgrof@do-not-panic.com
      Link: http://lkml.kernel.org/r/1432628901-18044-9-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      9e76561f
    • T
      x86/mm/mtrr: Enhance MTRR checks in kernel mapping helpers · b73522e0
      Toshi Kani 提交于
      This patch adds the argument 'uniform' to mtrr_type_lookup(),
      which gets set to 1 when a given range is covered uniformly by
      MTRRs, i.e. the range is fully covered by a single MTRR entry or
      the default type.
      
      Change pud_set_huge() and pmd_set_huge() to honor the 'uniform'
      flag to see if it is safe to create a huge page mapping in the
      range.
      
      This allows them to create a huge page mapping in a range
      covered by a single MTRR entry of any memory type. It also
      detects a non-optimal request properly. They continue to check
      with the WB type since it does not effectively change the
      uniform mapping even if a request spans multiple MTRR entries.
      
      pmd_set_huge() logs a warning message to a non-optimal request
      so that driver writers will be aware of such a case. Drivers
      should make a mapping request aligned to a single MTRR entry
      when the range is covered by MTRRs.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      [ Realign, flesh out comments, improve warning message. ]
      Signed-off-by: NBorislav 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/1431714237-880-7-git-send-email-toshi.kani@hp.com
      Link: http://lkml.kernel.org/r/1432628901-18044-8-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      b73522e0
    • T
      x86/mm/mtrr: Clean up mtrr_type_lookup() · 0cc705f5
      Toshi Kani 提交于
      MTRRs contain fixed and variable entries. mtrr_type_lookup() may
      repeatedly call __mtrr_type_lookup() to handle a request that
      overlaps with variable entries.
      
      However, __mtrr_type_lookup() also handles the fixed entries,
      which do not have to be repeated. Therefore, this patch creates
      separate functions, mtrr_type_lookup_fixed() and
      mtrr_type_lookup_variable(), to handle the fixed and variable
      ranges respectively.
      
      The patch also updates the function headers to clarify the
      return values and output argument. It updates comments to
      clarify that the repeating is necessary to handle overlaps with
      the default type, since overlaps with multiple entries alone can
      be handled without such repeating.
      
      There is no functional change in this patch.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NBorislav 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/1431714237-880-6-git-send-email-toshi.kani@hp.com
      Link: http://lkml.kernel.org/r/1432628901-18044-6-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      0cc705f5
    • T
      x86/mm/mtrr: Use symbolic define as a retval for disabled MTRRs · 3d3ca416
      Toshi Kani 提交于
      mtrr_type_lookup() returns verbatim 0xFF when MTRRs are
      disabled. This patch defines MTRR_TYPE_INVALID to clarify the
      meaning of this value, and documents its usage.
      
      Document the return values of the kernel virtual address mapping
      helpers pud_set_huge(), pmd_set_huge, pud_clear_huge() and
      pmd_clear_huge().
      
      There is no functional change in this patch.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NBorislav 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/1431714237-880-5-git-send-email-toshi.kani@hp.com
      Link: http://lkml.kernel.org/r/1432628901-18044-5-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      3d3ca416
    • T
      x86/mm/mtrr: Fix MTRR state checks in mtrr_type_lookup() · 9b3aca62
      Toshi Kani 提交于
      'mtrr_state.enabled' contains the FE (fixed MTRRs enabled)
      and E (MTRRs enabled) flags in MSR_MTRRdefType.  Intel SDM,
      section 11.11.2.1, defines these flags as follows:
      
       - All MTRRs are disabled when the E flag is clear.
         The FE flag has no affect when the E flag is clear.
       - The default type is enabled when the E flag is set.
       - MTRR variable ranges are enabled when the E flag is set.
       - MTRR fixed ranges are enabled when both E and FE flags
         are set.
      
      MTRR state checks in __mtrr_type_lookup() do not match with SDM.
      
      Hence, this patch makes the following changes:
       - The current code detects MTRRs disabled when both E and
         FE flags are clear in mtrr_state.enabled.  Fix to detect
         MTRRs disabled when the E flag is clear.
       - The current code does not check if the FE bit is set in
         mtrr_state.enabled when looking at the fixed entries.
         Fix to check the FE flag.
       - The current code returns the default type when the E flag
         is clear in mtrr_state.enabled. However, the default type
         is UC when the E flag is clear.  Remove the code as this
         case is handled as MTRR disabled with the 1st change.
      
      In addition, this patch defines the E and FE flags in
      mtrr_state.enabled as follows.
       - FE flag: MTRR_STATE_MTRR_FIXED_ENABLED
       - E  flag: MTRR_STATE_MTRR_ENABLED
      
      print_mtrr_state() and x86_get_mtrr_mem_range() are also updated
      accordingly.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NBorislav 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/1431714237-880-4-git-send-email-toshi.kani@hp.com
      Link: http://lkml.kernel.org/r/1432628901-18044-4-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      9b3aca62
    • T
      x86/mm/mtrr: Fix MTRR lookup to handle an inclusive entry · 7f0431e3
      Toshi Kani 提交于
      When an MTRR entry is inclusive to a requested range, i.e. the
      start and end of the request are not within the MTRR entry range
      but the range contains the MTRR entry entirely:
      
        range_start ... [mtrr_start ... mtrr_end] ... range_end
      
      __mtrr_type_lookup() ignores such a case because both
      start_state and end_state are set to zero.
      
      This bug can cause the following issues:
      
      1) reserve_memtype() tracks an effective memory type in case
         a request type is WB (ex. /dev/mem blindly uses WB). Missing
         to track with its effective type causes a subsequent request
         to map the same range with the effective type to fail.
      
      2) pud_set_huge() and pmd_set_huge() check if a requested range
         has any overlap with MTRRs. Missing to detect an overlap may
         cause a performance penalty or undefined behavior.
      
      This patch fixes the bug by adding a new flag, 'inclusive',
      to detect the inclusive case.  This case is then handled in
      the same way as end_state:1 since the first region is the same.
      With this fix, __mtrr_type_lookup() handles the inclusive case
      properly.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NBorislav 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/1431714237-880-3-git-send-email-toshi.kani@hp.com
      Link: http://lkml.kernel.org/r/1432628901-18044-3-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      7f0431e3
    • T
      x86/mm/kconfig: Simplify conditions for HAVE_ARCH_HUGE_VMAP · 10455f64
      Toshi Kani 提交于
      Simplify the conditions selecting HAVE_ARCH_HUGE_VMAP since
      X86_PAE depends on X86_32 already.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NBorislav 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/1431714237-880-2-git-send-email-toshi.kani@hp.com
      Link: http://lkml.kernel.org/r/1432628901-18044-2-git-send-email-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
      10455f64
    • L
      ARM: imx6: gpc: don't register power domain if DT data is missing · b17c70cd
      Lucas Stach 提交于
      If the devicetree is too old and does not provide the regulator and clocks
      for the power domain, we need to avoid registering the power domain.
      Otherwise runtime PM will try to control the domain, which will lead to
      machine hangs without the proper DT configuration data.
      
      This restores functionality to the kernel 4.0 level if an old DT is
      detected, where the power domain is constantly powered on.
      Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      b17c70cd
    • L
      ARM: imx6: allow booting with old DT · 634a6037
      Lucas Stach 提交于
      The GPC rewrite to IRQ domains has been on the premise that it may break
      suspend/resume for new kernels on old DT, but otherwise keep things working
      from a user perspective. This was an accepted compromise to be able to move
      the GIC cleanup forward.
      
      What actually happened was that booting a new kernel on an old DT crashes
      before even the console is up, so the user does not even see the warning
      that the DT is too old. The warning message suggests that this has been
      known before, which is clearly unacceptable.
      
      Fix the early crash by mapping the GPC memory space if the IRQ controller
      doesn't claim it. This keeps at least CPUidle and the needed CPU wakeup
      workarounds working. With this fixed the system is able to boot up
      properly minus the expected suspend/resume breakage.
      Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      634a6037
    • C
      alpha: kernel: osf_sys: Set 'kts.tv_nsec' only when 'tv' has effect · cceaeddc
      Chen Gang 提交于
      The related warning:
      
          CC      init/do_mounts.o
        arch/alpha/kernel/osf_sys.c: In function 'SyS_osf_settimeofday':
        arch/alpha/kernel/osf_sys.c:1028:14: warning: 'kts.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized]
          kts.tv_nsec *= 1000;
                      ^
        arch/alpha/kernel/osf_sys.c:1016:18: note: 'kts' was declared here
          struct timespec kts;
                          ^
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      cceaeddc
    • C
      alpha: Wire up all missing implemented syscalls · 228fa858
      Chen Gang 提交于
      And still left the missing unimplemented syscalls as warnings. The
      related warnings for missing implemented syscalls:
      
          CALL    scripts/checksyscalls.sh
        <stdin>:1241:2: warning: #warning syscall getrandom not implemented [-Wcpp]
        <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
        <stdin>:1250:2: warning: #warning syscall execveat not implemented [-Wcpp]
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      228fa858
    • H
      alpha: Fix bootpfile and bootpzfile make targets · 23430603
      Helge Deller 提交于
      Fix the bootpfile and bootpzfile make targets to creat BOOTP images.
      Both targets were broken due to some missing defines to re-map ELF
      constants. In addition the old code used the generic vsprintf function
      of the kernel which we now replace by a simple and much smaller
      implementation for the bootloader.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      23430603
    • A
      alpha: copy_thread(): rename 'arg' argument to 'kthread_arg' · 9f7b2d1f
      Alex Dowad 提交于
      The 'arg' argument to copy_thread() is only ever used when forking a new
      kernel thread. Hence, rename it to 'kthread_arg' for clarity (and consistency
      with do_fork() and other arch-specific implementations of copy_thread()).
      Signed-off-by: NAlex Dowad <alexinbeijing@gmail.com>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      9f7b2d1f
    • P
      alpha: delete non-required instances of <linux/init.h> · 0bc25674
      Paul Gortmaker 提交于
      None of these files are actually using any __init type directives
      and hence don't need to include <linux/init.h>.  Most are just a
      left over from __devinit and __cpuinit removal, or simply due to
      code getting copied from one driver to the next.
      Acked-by: NRichard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: linux-alpha@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      0bc25674
    • P
      alpha: don't use module_init for non-modular core code · 11447c7c
      Paul Gortmaker 提交于
      The srm console is always built in.  It will never be modular,
      so using module_init as an alias for __initcall is rather
      misleading.
      
      Fix this up now, so that we can relocate module_init from
      init.h into module.h in the future.  If we don't do this, we'd
      have to add module.h to obviously non-modular code, and that
      would be a worse thing.
      
      Direct use of __initcall is discouraged, vs prioritized ones.
      Use of device_initcall is consistent with what __initcall
      maps onto, and hence does not change the init order, making the
      impact of this change zero.   Should someone with real hardware
      for boot testing want to change it later to arch_initcall or
      console_initcall, they can do that at a later date.
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Acked-by: NMatt Turner <mattst88@gmail.com>
      Cc: linux-alpha@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      11447c7c
    • J
      smp, alpha: kill SMP single function call interrupt · 614aab52
      Jiang Liu 提交于
      Commit 9a46ad6d "smp: make smp_call_function_many() use logic
      similar to smp_call_function_single()" has unified the way to handle
      single and multiple cross-CPU function calls. Now only one interrupt
      is needed for architecture specific code to support generic SMP function
      call interfaces, so kill the redundant single function call interrupt.
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jiri Kosina <trivial@kernel.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Acked-by: NMatt Turner <mattst88@gmail.com>
      Cc: linux-alpha@vger.kernel.org
      Signed-off-by: NJiang Liu <liuj97@gmail.com>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      614aab52
    • G
      alpha: Remove #include <uapi/asm/types.h> from <asm/types.h> · ae6d78d7
      Geert Uytterhoeven 提交于
      Everything in arch/alpha/include/uapi/asm/types.h is protected by
      "#ifndef __KERNEL__", so it's unused for kernelspace.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Acked-by: NMatt Turner <mattst88@gmail.com>
      Cc: linux-alpha@vger.kernel.org
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      ae6d78d7
    • Y
      alpha: clean up unnecessary MSI/MSI-X capability find · ebdd117e
      Yijing Wang 提交于
      PCI core will initialize device MSI/MSI-X capability in
      pci_msi_init_pci_dev(). So device driver should use
      pci_dev->msi_cap/msix_cap to determine whether the device
      support MSI/MSI-X instead of using
      pci_find_capability(pci_dev, PCI_CAP_ID_MSI/MSIX).
      Access to PCIe device config space again will consume more time.
      Signed-off-by: NYijing Wang <wangyijing@huawei.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Acked-by: NMatt Turner <mattst88@gmail.com>
      Cc: Phil Carmody <pc+lkml@asdf.org>
      Cc: linux-alpha@vger.kernel.org
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      ebdd117e
  8. 26 5月, 2015 3 次提交
  9. 25 5月, 2015 1 次提交
  10. 23 5月, 2015 1 次提交