]> Git Repo - linux.git/commitdiff
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <[email protected]>
Mon, 1 Feb 2016 00:17:19 +0000 (16:17 -0800)
committerLinus Torvalds <[email protected]>
Mon, 1 Feb 2016 00:17:19 +0000 (16:17 -0800)
Pull x86 fixes from Thomas Gleixner:
 "A bit on the largish side due to a series of fixes for a regression in
  the x86 vector management which was introduced in 4.3.  This work was
  started in December already, but it took some time to fix all corner
  cases and a couple of older bugs in that area which were detected
  while at it

  Aside of that a few platform updates for intel-mid, quark and UV and
  two fixes for in the mm code:
   - Use proper types for pgprot values to avoid truncation
   - Prevent a size truncation in the pageattr code when setting page
     attributes for large mappings"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
  x86/mm/pat: Avoid truncation when converting cpa->numpages to address
  x86/mm: Fix types used in pgprot cacheability flags translations
  x86/platform/quark: Print boundaries correctly
  x86/platform/UV: Remove EFI memmap quirk for UV2+
  x86/platform/intel-mid: Join string and fix SoC name
  x86/platform/intel-mid: Enable 64-bit build
  x86/irq: Plug vector cleanup race
  x86/irq: Call irq_force_move_complete with irq descriptor
  x86/irq: Remove outgoing CPU from vector cleanup mask
  x86/irq: Remove the cpumask allocation from send_cleanup_vector()
  x86/irq: Clear move_in_progress before sending cleanup IPI
  x86/irq: Remove offline cpus from vector cleanup
  x86/irq: Get rid of code duplication
  x86/irq: Copy vectormask instead of an AND operation
  x86/irq: Check vector allocation early
  x86/irq: Reorganize the search in assign_irq_vector
  x86/irq: Reorganize the return path in assign_irq_vector
  x86/irq: Do not use apic_chip_data.old_domain as temporary buffer
  x86/irq: Validate that irq descriptor is still active
  x86/irq: Fix a race in x86_vector_free_irqs()
  ...

1  2 
arch/x86/Kconfig
arch/x86/include/asm/pgtable_types.h
arch/x86/platform/intel-quark/imr.c

diff --combined arch/x86/Kconfig
index 330e738ccfc13633954a02677e46bb1b12605fa9,07459a6b417d0ccbbc69e664dc6ea091fd1bd9c1..9af2e63384005002bc99c762f8a61fdd1bbbb3ca
@@@ -24,14 -24,12 +24,14 @@@ config X8
        select ARCH_DISCARD_MEMBLOCK
        select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
        select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
 +      select ARCH_HAS_DEVMEM_IS_ALLOWED
        select ARCH_HAS_ELF_RANDOMIZE
        select ARCH_HAS_FAST_MULTIPLIER
        select ARCH_HAS_GCOV_PROFILE_ALL
        select ARCH_HAS_PMEM_API                if X86_64
        select ARCH_HAS_MMIO_FLUSH
        select ARCH_HAS_SG_CHAIN
 +      select ARCH_HAS_UBSAN_SANITIZE_ALL
        select ARCH_HAVE_NMI_SAFE_CMPXCHG
        select ARCH_MIGHT_HAVE_ACPI_PDC         if ACPI
        select ARCH_MIGHT_HAVE_PC_PARPORT
@@@ -84,8 -82,6 +84,8 @@@
        select HAVE_ARCH_KASAN                  if X86_64 && SPARSEMEM_VMEMMAP
        select HAVE_ARCH_KGDB
        select HAVE_ARCH_KMEMCHECK
 +      select HAVE_ARCH_MMAP_RND_BITS          if MMU
 +      select HAVE_ARCH_MMAP_RND_COMPAT_BITS   if MMU && COMPAT
        select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_SOFT_DIRTY             if X86_64
        select HAVE_ARCH_TRACEHOOK
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DEBUG_STACKOVERFLOW
        select HAVE_DMA_API_DEBUG
 -      select HAVE_DMA_ATTRS
        select HAVE_DMA_CONTIGUOUS
        select HAVE_DYNAMIC_FTRACE
        select HAVE_DYNAMIC_FTRACE_WITH_REGS
@@@ -180,23 -177,12 +180,23 @@@ config LOCKDEP_SUPPOR
  config STACKTRACE_SUPPORT
        def_bool y
  
 -config HAVE_LATENCYTOP_SUPPORT
 -      def_bool y
 -
  config MMU
        def_bool y
  
 +config ARCH_MMAP_RND_BITS_MIN
 +      default 28 if 64BIT
 +      default 8
 +
 +config ARCH_MMAP_RND_BITS_MAX
 +      default 32 if 64BIT
 +      default 16
 +
 +config ARCH_MMAP_RND_COMPAT_BITS_MIN
 +      default 8
 +
 +config ARCH_MMAP_RND_COMPAT_BITS_MAX
 +      default 16
 +
  config SBUS
        bool
  
@@@ -509,11 -495,10 +509,10 @@@ config X86_INTEL_C
  
  config X86_INTEL_MID
        bool "Intel MID platform support"
-       depends on X86_32
        depends on X86_EXTENDED_PLATFORM
        depends on X86_PLATFORM_DEVICES
        depends on PCI
-       depends on PCI_GOANY
+       depends on X86_64 || (PCI_GOANY && X86_32)
        depends on X86_IO_APIC
        select SFI
        select I2C
@@@ -548,10 -533,9 +547,10 @@@ config X86_INTEL_QUAR
  
  config X86_INTEL_LPSS
        bool "Intel Low Power Subsystem Support"
 -      depends on ACPI
 +      depends on X86 && ACPI
        select COMMON_CLK
        select PINCTRL
 +      select IOSF_MBI
        ---help---
          Select to build support for Intel Low Power Subsystem such as
          found on Intel Lynxpoint PCH. Selecting this option enables
@@@ -2699,19 -2683,6 +2698,19 @@@ config PMC_ATO
        def_bool y
          depends on PCI
  
 +config VMD
 +      depends on PCI_MSI
 +      tristate "Volume Management Device Driver"
 +      default N
 +      ---help---
 +        Adds support for the Intel Volume Management Device (VMD). VMD is a
 +        secondary PCI host bridge that allows PCI Express root ports,
 +        and devices attached to them, to be removed from the default
 +        PCI domain and placed within the VMD domain. This provides
 +        more bus resources than are otherwise possible with a
 +        single domain. If you know your system provides one of these and
 +        has devices attached to it, say Y; if you are not sure, say N.
 +
  source "net/Kconfig"
  
  source "drivers/Kconfig"
index 04c27a0131656db29e97805432e56d3a1aae5992,79c91853e50ea6c23fcbc1a66dd5b7154f7ce5c3..4432ab7f407ccc5f47ea9c19a850c29af821d8c9
  #define _PAGE_BIT_PAT_LARGE   12      /* On 2MB or 1GB pages */
  #define _PAGE_BIT_SPECIAL     _PAGE_BIT_SOFTW1
  #define _PAGE_BIT_CPA_TEST    _PAGE_BIT_SOFTW1
 -#define _PAGE_BIT_SPLITTING   _PAGE_BIT_SOFTW2 /* only valid on a PSE pmd */
  #define _PAGE_BIT_HIDDEN      _PAGE_BIT_SOFTW3 /* hidden by kmemcheck */
  #define _PAGE_BIT_SOFT_DIRTY  _PAGE_BIT_SOFTW3 /* software dirty tracking */
 -#define _PAGE_BIT_NX           63       /* No execute: only valid after cpuid check */
 +#define _PAGE_BIT_SOFTW4      58      /* available for programmer */
 +#define _PAGE_BIT_DEVMAP              _PAGE_BIT_SOFTW4
 +#define _PAGE_BIT_NX          63      /* No execute: only valid after cpuid check */
  
  /* If _PAGE_BIT_PRESENT is clear, we use these: */
  /* - if the user mapped it with PROT_NONE; pte_present gives true */
@@@ -47,6 -46,7 +47,6 @@@
  #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
  #define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL)
  #define _PAGE_CPA_TEST        (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST)
 -#define _PAGE_SPLITTING       (_AT(pteval_t, 1) << _PAGE_BIT_SPLITTING)
  #define __HAVE_ARCH_PTE_SPECIAL
  
  #ifdef CONFIG_KMEMCHECK
  
  #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
  #define _PAGE_NX      (_AT(pteval_t, 1) << _PAGE_BIT_NX)
 +#define _PAGE_DEVMAP  (_AT(u64, 1) << _PAGE_BIT_DEVMAP)
 +#define __HAVE_ARCH_PTE_DEVMAP
  #else
  #define _PAGE_NX      (_AT(pteval_t, 0))
 +#define _PAGE_DEVMAP  (_AT(pteval_t, 0))
  #endif
  
  #define _PAGE_PROTNONE        (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE)
@@@ -366,20 -363,18 +366,18 @@@ static inline enum page_cache_mode pgpr
  }
  static inline pgprot_t pgprot_4k_2_large(pgprot_t pgprot)
  {
+       pgprotval_t val = pgprot_val(pgprot);
        pgprot_t new;
-       unsigned long val;
  
-       val = pgprot_val(pgprot);
        pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
                ((val & _PAGE_PAT) << (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT));
        return new;
  }
  static inline pgprot_t pgprot_large_2_4k(pgprot_t pgprot)
  {
+       pgprotval_t val = pgprot_val(pgprot);
        pgprot_t new;
-       unsigned long val;
  
-       val = pgprot_val(pgprot);
        pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
                          ((val & _PAGE_PAT_LARGE) >>
                           (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT));
index c1bdafaac3ca828cec43af9e43d12933e4de7ea9,ad5ec6f784e83ebdca55ae99c08d49f2a54bb4b5..c61b6c332e971929fd4d639b9754e8707f513930
@@@ -111,19 -111,23 +111,19 @@@ static int imr_read(struct imr_device *
        u32 reg = imr_id * IMR_NUM_REGS + idev->reg_base;
        int ret;
  
 -      ret = iosf_mbi_read(QRK_MBI_UNIT_MM, QRK_MBI_MM_READ,
 -                              reg++, &imr->addr_lo);
 +      ret = iosf_mbi_read(QRK_MBI_UNIT_MM, MBI_REG_READ, reg++, &imr->addr_lo);
        if (ret)
                return ret;
  
 -      ret = iosf_mbi_read(QRK_MBI_UNIT_MM, QRK_MBI_MM_READ,
 -                              reg++, &imr->addr_hi);
 +      ret = iosf_mbi_read(QRK_MBI_UNIT_MM, MBI_REG_READ, reg++, &imr->addr_hi);
        if (ret)
                return ret;
  
 -      ret = iosf_mbi_read(QRK_MBI_UNIT_MM, QRK_MBI_MM_READ,
 -                              reg++, &imr->rmask);
 +      ret = iosf_mbi_read(QRK_MBI_UNIT_MM, MBI_REG_READ, reg++, &imr->rmask);
        if (ret)
                return ret;
  
 -      return iosf_mbi_read(QRK_MBI_UNIT_MM, QRK_MBI_MM_READ,
 -                              reg++, &imr->wmask);
 +      return iosf_mbi_read(QRK_MBI_UNIT_MM, MBI_REG_READ, reg++, &imr->wmask);
  }
  
  /**
@@@ -147,27 -151,31 +147,27 @@@ static int imr_write(struct imr_device 
  
        local_irq_save(flags);
  
 -      ret = iosf_mbi_write(QRK_MBI_UNIT_MM, QRK_MBI_MM_WRITE, reg++,
 -                              imr->addr_lo);
 +      ret = iosf_mbi_write(QRK_MBI_UNIT_MM, MBI_REG_WRITE, reg++, imr->addr_lo);
        if (ret)
                goto failed;
  
 -      ret = iosf_mbi_write(QRK_MBI_UNIT_MM, QRK_MBI_MM_WRITE,
 -                              reg++, imr->addr_hi);
 +      ret = iosf_mbi_write(QRK_MBI_UNIT_MM, MBI_REG_WRITE, reg++, imr->addr_hi);
        if (ret)
                goto failed;
  
 -      ret = iosf_mbi_write(QRK_MBI_UNIT_MM, QRK_MBI_MM_WRITE,
 -                              reg++, imr->rmask);
 +      ret = iosf_mbi_write(QRK_MBI_UNIT_MM, MBI_REG_WRITE, reg++, imr->rmask);
        if (ret)
                goto failed;
  
 -      ret = iosf_mbi_write(QRK_MBI_UNIT_MM, QRK_MBI_MM_WRITE,
 -                              reg++, imr->wmask);
 +      ret = iosf_mbi_write(QRK_MBI_UNIT_MM, MBI_REG_WRITE, reg++, imr->wmask);
        if (ret)
                goto failed;
  
        /* Lock bit must be set separately to addr_lo address bits. */
        if (lock) {
                imr->addr_lo |= IMR_LOCK;
 -              ret = iosf_mbi_write(QRK_MBI_UNIT_MM, QRK_MBI_MM_WRITE,
 -                                      reg - IMR_NUM_REGS, imr->addr_lo);
 +              ret = iosf_mbi_write(QRK_MBI_UNIT_MM, MBI_REG_WRITE,
 +                                   reg - IMR_NUM_REGS, imr->addr_lo);
                if (ret)
                        goto failed;
        }
@@@ -220,11 -228,12 +220,12 @@@ static int imr_dbgfs_state_show(struct 
                if (imr_is_enabled(&imr)) {
                        base = imr_to_phys(imr.addr_lo);
                        end = imr_to_phys(imr.addr_hi) + IMR_MASK;
+                       size = end - base + 1;
                } else {
                        base = 0;
                        end = 0;
+                       size = 0;
                }
-               size = end - base;
                seq_printf(s, "imr%02i: base=%pa, end=%pa, size=0x%08zx "
                           "rmask=0x%08x, wmask=0x%08x, %s, %s\n", i,
                           &base, &end, size, imr.rmask, imr.wmask,
@@@ -579,6 -588,7 +580,7 @@@ static void __init imr_fixup_memmap(str
  {
        phys_addr_t base = virt_to_phys(&_text);
        size_t size = virt_to_phys(&__end_rodata) - base;
+       unsigned long start, end;
        int i;
        int ret;
  
        for (i = 0; i < idev->max_imr; i++)
                imr_clear(i);
  
+       start = (unsigned long)_text;
+       end = (unsigned long)__end_rodata - 1;
        /*
         * Setup a locked IMR around the physical extent of the kernel
         * from the beginning of the .text secton to the end of the
         * .rodata section as one physically contiguous block.
+        *
+        * We don't round up @size since it is already PAGE_SIZE aligned.
+        * See vmlinux.lds.S for details.
         */
        ret = imr_add_range(base, size, IMR_CPU, IMR_CPU, true);
        if (ret < 0) {
-               pr_err("unable to setup IMR for kernel: (%p - %p)\n",
-                       &_text, &__end_rodata);
+               pr_err("unable to setup IMR for kernel: %zu KiB (%lx - %lx)\n",
+                       size / 1024, start, end);
        } else {
-               pr_info("protecting kernel .text - .rodata: %zu KiB (%p - %p)\n",
-                       size / 1024, &_text, &__end_rodata);
+               pr_info("protecting kernel .text - .rodata: %zu KiB (%lx - %lx)\n",
+                       size / 1024, start, end);
        }
  
  }
This page took 0.131145 seconds and 4 git commands to generate.