1. 01 12月, 2015 11 次提交
  2. 26 11月, 2015 3 次提交
  3. 28 10月, 2015 12 次提交
  4. 23 10月, 2015 1 次提交
    • S
      powerpc/85xx: Load all early TLB entries at once · d9e1831a
      Scott Wood 提交于
      Use an AS=1 trampoline TLB entry to allow all normal TLB1 entries to
      be loaded at once.  This avoids the need to keep the translation that
      code is executing from in the same TLB entry in the final TLB
      configuration as during early boot, which in turn is helpful for
      relocatable kernels (e.g. kdump) where the kernel is not running from
      what would be the first TLB entry.
      
      On e6500, we limit map_mem_in_cams() to the primary hwthread of a
      core (the boot cpu is always considered primary, as a kdump kernel
      can be entered on any cpu).  Each TLB only needs to be set up once,
      and when we do, we don't want another thread to be running when we
      create a temporary trampoline TLB1 entry.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      d9e1831a
  5. 22 10月, 2015 1 次提交
    • V
      powerpc/rtas: Validate rtas.entry before calling enter_rtas() · 8832317f
      Vasant Hegde 提交于
      Currently we do not validate rtas.entry before calling enter_rtas(). This
      leads to a kernel oops when user space calls rtas system call on a powernv
      platform (see below). This patch adds code to validate rtas.entry before
      making enter_rtas() call.
      
        Oops: Exception in kernel mode, sig: 4 [#1]
        SMP NR_CPUS=1024 NUMA PowerNV
        task: c000000004294b80 ti: c0000007e1a78000 task.ti: c0000007e1a78000
        NIP: 0000000000000000 LR: 0000000000009c14 CTR: c000000000423140
        REGS: c0000007e1a7b920 TRAP: 0e40   Not tainted  (3.18.17-340.el7_1.pkvm3_1_0.2400.1.ppc64le)
        MSR: 1000000000081000 <HV,ME>  CR: 00000000  XER: 00000000
        CFAR: c000000000009c0c SOFTE: 0
        NIP [0000000000000000]           (null)
        LR [0000000000009c14] 0x9c14
        Call Trace:
        [c0000007e1a7bba0] [c00000000041a7f4] avc_has_perm_noaudit+0x54/0x110 (unreliable)
        [c0000007e1a7bd80] [c00000000002ddc0] ppc_rtas+0x150/0x2d0
        [c0000007e1a7be30] [c000000000009358] syscall_exit+0x0/0x98
      
      Cc: stable@vger.kernel.org # v3.2+
      Fixes: 55190f88 ("powerpc: Add skeleton PowerNV platform")
      Reported-by: NNAGESWARA R. SASTRY <nasastry@in.ibm.com>
      Signed-off-by: NVasant Hegde <hegdevasant@linux.vnet.ibm.com>
      [mpe: Reword change log, trim oops, and add stable + fixes]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      8832317f
  6. 21 10月, 2015 5 次提交
    • G
      powerpc/eeh: More relaxed condition for enabled IO path · 872ee2d6
      Gavin Shan 提交于
      When one or both of the below two flags are marked in the PE state, the
      PE's IO path is regarded as enabled: EEH_STATE_MMIO_ACTIVE or
      EEH_STATE_MMIO_ENABLED.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      872ee2d6
    • G
      powerpc/eeh: Force reset on fenced PHB · 8234fced
      Gavin Shan 提交于
      On fenced PHB, the error handlers in the drivers of its subordinate
      devices could return PCI_ERS_RESULT_CAN_RECOVER, indicating no reset
      will be issued during the recovery. It's conflicting with the fact
      that fenced PHB won't be recovered without reset.
      
      This limits the return value from the error handlers in the drivers
      of the fenced PHB's subordinate devices to PCI_ERS_RESULT_NEED_NONE
      or PCI_ERS_RESULT_NEED_RESET, to ensure reset will be issued during
      recovery.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: NDaniel Axtens <dja@axtens.net>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      8234fced
    • G
      powerpc/eeh: More relaxed hotplug criterion · f2da4ccf
      Gavin Shan 提交于
      Currently, we rely on the existence of struct pci_driver::err_handler
      to decide if the corresponding PCI device should be unplugged during
      EEH recovery (partially hotplug case). However that check is not
      sufficient. Some device drivers implement only some of the EEH error
      handlers to collect diag-data. That means the driver still expects a
      hotplug to recover from the EEH error.
      
      This makes the hotplug criterion more relaxed: if the device driver
      doesn't provide all necessary EEH error handlers, it will experience
      hotplug during EEH recovery.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      [mpe: Minor change log rewording]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f2da4ccf
    • G
      powerpc/eeh: Don't unfreeze PHB PE after reset · 527d10ef
      Gavin Shan 提交于
      On PowerNV platform, the PE is kept in frozen state until the PE
      reset is completed to avoid recursive EEH error caused by MMIO
      access during the period of EEH reset. The PE's frozen state is
      cleared after BARs of PCI device included in the PE are restored
      and enabled. However, we needn't clear the frozen state for PHB PE
      explicitly at this point as there is no real PE for PHB PE. As the
      PHB PE is always binding with PE#0, we actually clear PE#0, which
      is wrong. It doesn't incur any problem though.
      
      This checks if the PE is PHB PE and doesn't clear the frozen state
      if it is.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      527d10ef
    • C
      powerpc/prom: Avoid reference to potentially freed memory · 1856f50c
      Christophe Jaillet 提交于
      of_get_property() is used inside the loop, but then the reference to the
      node is dropped before dereferencing the prop pointer, which could by then
      point to junk if the node has been freed.
      
      Instead use of_property_read_u32() to actually read the property
      value before dropping the reference.
      
      of_property_read_u32() requires at least one cell (u32) to be present,
      which is stricter than the old logic which would happily dereference a
      property of any size. However we believe all device trees in the wild
      have at least one cell.
      
      Skiboot may produce memory nodes with more than one cell, but that is
      OK, of_property_read_u32() will return the first one.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      [mpe: Expand change log with device tree details]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1856f50c
  7. 19 10月, 2015 3 次提交
  8. 15 10月, 2015 3 次提交
  9. 12 10月, 2015 1 次提交
    • A
      powerpc/mm: Differentiate between hugetlb and THP during page walk · 891121e6
      Aneesh Kumar K.V 提交于
      We need to properly identify whether a hugepage is an explicit or
      a transparent hugepage in follow_huge_addr(). We used to depend
      on hugepage shift argument to do that. But in some case that can
      result in wrong results. For ex:
      
      On finding a transparent hugepage we set hugepage shift to PMD_SHIFT.
      But we can end up clearing the thp pte, via pmdp_huge_get_and_clear.
      We do prevent reusing the pfn page via the usage of
      kick_all_cpus_sync(). But that happens after we updated the pte to 0.
      Hence in follow_huge_addr() we can find hugepage shift set, but transparent
      huge page check fail for a thp pte.
      
      NOTE: We fixed a variant of this race against thp split in commit
      691e95fd
      ("powerpc/mm/thp: Make page table walk safe against thp split/collapse")
      
      Without this patch, we may hit the BUG_ON(flags & FOLL_GET) in
      follow_page_mask occasionally.
      
      In the long term, we may want to switch ppc64 64k page size config to
      enable CONFIG_ARCH_WANT_GENERAL_HUGETLB
      Reported-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      891121e6