1. 28 Jul, 2014 5 commits
  2. 23 Jul, 2014 1 commit
  3. 22 Jul, 2014 5 commits
    • Li Zhong's avatar
      powerpc: use _GLOBAL_TOC for memmove · 6f5405bc
      Li Zhong authored
      memmove may be called from module code copy_pages(btrfs), and it may
      call memcpy, which may call back to C code, so it needs to use
      _GLOBAL_TOC to set up r2 correctly.
      
      This fixes following error when I tried to boot an le guest:
      
      Vector: 300 (Data Access) at [c000000073f97210]
          pc: c000000000015004: enable_kernel_altivec+0x24/0x80
          lr: c000000000058fbc: enter_vmx_copy+0x3c/0x60
          sp: c000000073f97490
         msr: 8000000002009033
         dar: d000000001d50170
       dsisr: 40000000
        current = 0xc0000000734c0000
        paca    = 0xc00000000fff0000	 softe: 0	 irq_happened: 0x01
          pid   = 815, comm = mktemp
      enter ? for help
      [c000000073f974f0] c000000000058fbc enter_vmx_copy+0x3c/0x60
      [c000000073f97510] c000000000057d34 memcpy_power7+0x274/0x840
      [c000000073f97610] d000000001c3179c copy_pages+0xfc/0x110 [btrfs]
      [c000000073f97660] d000000001c3c248 memcpy_extent_buffer+0xe8/0x160 [btrfs]
      [c000000073f97700] d000000001be4be8 setup_items_for_insert+0x208/0x4a0 [btrfs]
      [c000000073f97820] d000000001be50b4 btrfs_insert_empty_items+0xf4/0x140 [btrfs]
      [c000000073f97890] d000000001bfed30 insert_with_overflow+0x70/0x180 [btrfs]
      [c000000073f97900] d000000001bff174 btrfs_insert_dir_item+0x114/0x2f0 [btrfs]
      [c000000073f979a0] d000000001c1f92c btrfs_add_link+0x10c/0x370 [btrfs]
      [c000000073f97a40] d000000001c20e94 btrfs_create+0x204/0x270 [btrfs]
      [c000000073f97b00] c00000000026d438 vfs_create+0x178/0x210
      [c000000073f97b50] c000000000270a70 do_last+0x9f0/0xe90
      [c000000073f97c20] c000000000271010 path_openat+0x100/0x810
      [c000000073f97ce0] c000000000272ea8 do_filp_open+0x58/0xd0
      [c000000073f97dc0] c00000000025ade8 do_sys_open+0x1b8/0x300
      [c000000073f97e30] c00000000000a008 syscall_exit+0x0/0x7c
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6f5405bc
    • Tyrel Datwyler's avatar
      powerpc/pseries: dynamically added OF nodes need to call of_node_init · 97a9a717
      Tyrel Datwyler authored
      Commit 75b57ecf refactored device tree nodes to use kobjects such that they
      can be exposed via /sysfs. A secondary commit 0829f6d1 furthered this rework
      by moving the kobect initialization logic out of of_node_add into its own
      of_node_init function. The inital commit removed the existing kref_init calls
      in the pseries dlpar code with the assumption kobject initialization would
      occur in of_node_add. The second commit had the side effect of triggering a
      BUG_ON during DLPAR, migration and suspend/resume operations as a result of
      dynamically added nodes being uninitialized.
      
      This patch fixes this by adding of_node_init calls in place of the previously
      removed kref_init calls.
      
      Fixes: 0829f6d1 ("of: device_node kobject lifecycle fixes")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Acked-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
      Acked-by: default avatarGrant Likely <grant.likely@linaro.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      97a9a717
    • Aneesh Kumar K.V's avatar
      powerpc: subpage_protect: Increase the array size to take care of 64TB · dad6f37c
      Aneesh Kumar K.V authored
      We now support TASK_SIZE of 16TB, hence the array should be 8.
      
      Fixes the below crash:
      
      Unable to handle kernel paging request for data at address 0x000100bd
      Faulting instruction address: 0xc00000000004f914
      cpu 0x13: Vector: 300 (Data Access) at [c000000fea75fa90]
          pc: c00000000004f914: .sys_subpage_prot+0x2d4/0x5c0
          lr: c00000000004fb5c: .sys_subpage_prot+0x51c/0x5c0
          sp: c000000fea75fd10
         msr: 9000000000009032
         dar: 100bd
       dsisr: 40000000
        current = 0xc000000fea6ae490
        paca    = 0xc00000000fb8ab00   softe: 0        irq_happened: 0x00
          pid   = 8237, comm = a.out
      enter ? for help
      [c000000fea75fe30] c00000000000a164 syscall_exit+0x0/0x98
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      dad6f37c
    • Paul Mackerras's avatar
      powerpc: Fix bugs in emulate_step() · e698b966
      Paul Mackerras authored
      This fixes some bugs in emulate_step().  First, the setting of the carry
      bit for the arithmetic right-shift instructions was not correct on 64-bit
      machines because we were masking with a mask of type int rather than
      unsigned long.  Secondly, the sld (shift left doubleword) instruction was
      using the wrong instruction field for the register containing the shift
      count.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e698b966
    • Joel Stanley's avatar
      powerpc: Disable doorbells on Power8 DD1.x · bd6ba351
      Joel Stanley authored
      These processors do not currently support doorbell IPIs, so remove them
      from the feature list if we are at DD 1.xx for the 0x004d part.
      
      This fixes a regression caused by d4e58e59 (powerpc/powernv: Enable
      POWER8 doorbell IPIs). With that patch the kernel would hang at boot
      when calling smp_call_function_many, as the doorbell would not be
      received by the target CPUs:
      
        .smp_call_function_many+0x2bc/0x3c0 (unreliable)
        .on_each_cpu_mask+0x30/0x100
        .cpuidle_register_driver+0x158/0x1a0
        .cpuidle_register+0x2c/0x110
        .powernv_processor_idle_init+0x23c/0x2c0
        .do_one_initcall+0xd4/0x260
        .kernel_init_freeable+0x25c/0x33c
        .kernel_init+0x1c/0x120
        .ret_from_kernel_thread+0x58/0x7c
      
      Fixes: d4e58e59 (powerpc/powernv: Enable POWER8 doorbell IPIs)
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bd6ba351
  4. 11 Jul, 2014 15 commits
  5. 02 Jul, 2014 3 commits
    • Laurentiu TUDOR's avatar
      powerpc/85xx: drop hypervisor specific board compatibles · cd115477
      Laurentiu TUDOR authored
      They're almost a duplicate of the boards array
      and we can build them at run-time.
      Signed-off-by: default avatarLaurentiu Tudor <Laurentiu.Tudor@freescale.com>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      cd115477
    • Shengzhou Liu's avatar
      powerpc/fsl-booke: Add initial T208x QDS board support · 4c18be2b
      Shengzhou Liu authored
      Add support for Freescale T2080/T2081 QDS Development System Board.
      
      The T2080QDS Development System is a high-performance computing,
      evaluation, and development platform that supports T2080 QorIQ
      Power Architecture processor, with following major features:
      
      T2080QDS feature overview:
      Processor:
       - T2080 SoC integrating four 64-bit dual-threads e6500 cores up to 1.8GHz
      Memory:
       - Single memory controller capable of supporting DDR3 and DDR3-LP
       - Dual DIMM slots up 2133MT/s with ECC
      Ethernet interfaces:
       - Two 1Gbps RGMII on-board ports
       - Four 10Gbps XFI on-board cages
       - 1Gbps/2.5Gbps SGMII Riser card
       - 10Gbps XAUI Riser card
      Accelerator:
       - DPAA components consist of FMan, BMan, QMan, PME, DCE and SEC
      SerDes:
       - 16 lanes up to 10.3125GHz
       - Supports Aurora debug, PEX, SATA, SGMII, sRIO, HiGig, XFI and XAUI
      IFC:
       - 128MB NOR Flash, 512MB NAND Flash, PromJet debug port and FPGA
      eSPI:
       - Three SPI flash (16MB N25Q128A + 8MB EN25S64 + 512KB SST25WF040)
      USB:
       - Two USB2.0 ports with internal PHY (one Type-A + one micro Type-AB)
      PCIE:
       - Four PCI Express controllers (two PCIe 2.0 and two PCIe 3.0, SR-IOV)
      SATA:
       - Two SATA 2.0 ports on-board
      SRIO:
       - Two Serial RapidIO 2.0 ports up to 5 GHz
      eSDHC:
       - Supports SD/MMC/eMMC Card
      DMA:
       - Three 8-channels DMA controllers
      I2C:
       - Four I2C controllers.
      UART:
       - Dual 4-pins UART serial ports
      System Logic:
       - QIXIS-II FPGA system controll
      
      T2081QDS board shares the same PCB with T1040QDS with some differences.
      Signed-off-by: default avatarShengzhou Liu <Shengzhou.Liu@freescale.com>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      4c18be2b
    • Shengzhou Liu's avatar
      powerpc/fsl-booke: Add support for T2080/T2081 SoC · 1d8de8fc
      Shengzhou Liu authored
      The T2080 QorIQ multicore processor combines four dual-threaded e6500 Power
      Architecture processor cores with high-performance datapath acceleration
      logic and network and peripheral bus interfaces required for networking,
      telecom/datacom, wireless infrastructure, and mil/aerospace applications.
      
      The T2080 SoC includes the following function and features:
      - Four dual-threaded 64-bit Power architecture e6500 cores, up to 1.8GHz
      - 2MB L2 cache and 512KB CoreNet platform cache (CPC)
      - Hierarchical interconnect fabric
      - One 32-/64-bit DDR3/3L SDRAM memory controllers with ECC and interleaving
      - Data Path Acceleration Architecture (DPAA) incorporating acceleration
      - 16 SerDes lanes up to 10.3125 GHz
      - 8 Ethernet interfaces (multiple 1G/2.5G/10G MACs)
      - High-speed peripheral interfaces
        - Four PCI Express controllers (two PCIe 2.0 and two PCIe 3.0)
        - Two Serial RapidIO 2.0 controllers/ports running at up to 5 GHz
      - Additional peripheral interfaces
        - Two serial ATA (SATA 2.0) controllers
        - Two high-speed USB 2.0 controllers with integrated PHY
        - Enhanced secure digital host controller (SD/SDXC/eMMC)
        - Enhanced serial peripheral interface (eSPI)
        - Four I2C controllers
        - Four 2-pin UARTs or two 4-pin UARTs
        - Integrated Flash Controller supporting NAND and NOR flash
      - Three eight-channel DMA engines
      - Support for hardware virtualization and partitioning enforcement
      - QorIQ Platform's Trust Architecture 2.0
      
      T2081 is a reduced personality of T2080 with following difference:
      Feature               T2080 T2081
      1G Ethernet numbers:  8     6
      10G Ethernet numbers: 4     2
      SerDes lanes:         16    8
      Serial RapidIO,RMan:  2     no
      SATA Controller:      2     no
      Aurora:               yes   no
      SoC Package:          896-pins 780-pins
      Signed-off-by: default avatarShengzhou Liu <Shengzhou.Liu@freescale.com>
      [scottwood@freescale.com: added fsl,qoriq-pci-v3.0 for U-Boot compat]
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      1d8de8fc
  6. 25 Jun, 2014 8 commits
    • Scott Wood's avatar
      powerpc/8xx: Remove empty asm/mpc8xx.h · 087dfae3
      Scott Wood authored
      m8xx_pcmcia_ops was the only thing in this file (other than a comment
      that describes a usage that doesn't match the file's contents); now
      that m8xx_pcmcia_ops is gone, remove the empty file.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com>
      Cc: Vitaly Bordug <vitb@kernel.crashing.org>
      Cc: netdev@vger.kernel.org
      087dfae3
    • Scott Wood's avatar
      pcmcia: Remove m8xx_pcmcia driver · 39eb56da
      Scott Wood authored
      This driver doesn't build, and apparently has not built since
      arch/ppc was removed in 2008 (when mk_int_int_mask was removed
      from asm/irq.h, among other build errors).
      
      A few weeks ago I asked whether anyone was actively maintaining
      this code, and got no positive response:
      http://patchwork.ozlabs.org/patch/352082/
      
      So, let's remove it.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Cc: Vitaly Bordug <vitb@kernel.crashing.org>
      Cc: linux-pcmcia@lists.infradead.org
      Cc: Paul Bolle <pebolle@tiscali.nl>
      39eb56da
    • Bharat Bhushan's avatar
      booke/powerpc: define wimge shift mask to fix compilation error · 2759a7f1
      Bharat Bhushan authored
      This fixes below compilation error on SOCs where CONFIG_PHYS_64BIT
      is not defined:
      
       arch/powerpc/kvm/e500_mmu_host.c: In function 'kvmppc_e500_shadow_map':
      | arch/powerpc/kvm/e500_mmu_host.c:631:20: error: 'PTE_WIMGE_SHIFT' undeclared (first use in this function)
      |    wimg = (*ptep >> PTE_WIMGE_SHIFT) & MAS2_WIMGE_MASK;
      |                     ^
      | arch/powerpc/kvm/e500_mmu_host.c:631:20: note: each undeclared identifier is reported only once for each function it appears in
      | make[1]: *** [arch/powerpc/kvm/e500_mmu_host.o] Error 1
      Signed-off-by: default avatarBharat Bhushan <Bharat.Bhushan@freescale.com>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      2759a7f1
    • Wladislav Wiebe's avatar
      powerpc/traps/e500: fix misleading error output · c1528339
      Wladislav Wiebe authored
      In machine_check_e500 exception handler is a wrong indication
      in case of MCSR_BUS_WBERR - so print "Write" instead of "Read".
      Signed-off-by: default avatarWladislav Wiebe <wladislav.kw@gmail.com>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      c1528339
    • Chunhe Lan's avatar
      powerpc/85xx: Add T4240RDB board support · 36a2a09d
      Chunhe Lan authored
      T4240RDB board Specification
      ----------------------------
      Memory subsystem:
           6GB DDR3
           128MB NOR flash
           2GB NAND flash
      Ethernet:
           Eight 1G SGMII ports
           Four 10Gbps SFP+ ports
      PCIe:
           Two PCIe slots
      USB:
           Two USB2.0 Type A ports
      SDHC:
           One SD-card port
      SATA:
           One SATA port
      UART:
           Dual RJ45 ports
      Signed-off-by: default avatarChunhe Lan <Chunhe.Lan@freescale.com>
      Cc: Scott Wood <scottwood@freescale.com>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      36a2a09d
    • Scott Wood's avatar
      powerpc: Don't skip ePAPR spin-table CPUs · 6663a4fa
      Scott Wood authored
      Commit 59a53afe "powerpc: Don't setup
      CPUs with bad status" broke ePAPR SMP booting.  ePAPR says that CPUs
      that aren't presently running shall have status of disabled, with
      enable-method being used to determine whether the CPU can be enabled.
      
      Fix by checking for spin-table, which is currently the only supported
      enable-method.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Cc: Michael Neuling <mikey@neuling.org>
      Cc: Emil Medve <Emilian.Medve@Freescale.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6663a4fa
    • Laurent Dufour's avatar
      powerpc/module: Fix TOC symbol CRC · c2cbcf53
      Laurent Dufour authored
      The commit 71ec7c55 introduced the magic symbol ".TOC." for ELFv2 ABI.
      This symbol is built manually and has no CRC value computed. A zero value
      is put in the CRC section to avoid modpost complaining about a missing CRC.
      Unfortunately, this breaks the kernel module loading when the kernel is
      relocated (kdump case for instance) because of the relocation applied to
      the kcrctab values.
      
      This patch compute a CRC value for the TOC symbol which will match the one
      compute by the kernel when it is relocated - aka '0 - relocate_start' done in
      maybe_relocated called by check_version (module.c).
      Signed-off-by: default avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Cc: Anton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c2cbcf53
    • Michael Ellerman's avatar
      powerpc/powernv: Remove OPAL v1 takeover · e2500be2
      Michael Ellerman authored
      In commit 27f44888 "Add OPAL takeover from PowerVM" we added support
      for "takeover" on OPAL v1 machines.
      
      This was a mode of operation where we would boot under pHyp, and query
      for the presence of OPAL. If detected we would then do a special
      sequence to take over the machine, and the kernel would end up running
      in hypervisor mode.
      
      OPAL v1 was never a supported product, and was never shipped outside
      IBM. As far as we know no one is still using it.
      
      Newer versions of OPAL do not use the takeover mechanism. Although the
      query for OPAL should be harmless on machines with newer OPAL, we have
      seen a machine where it causes a crash in Open Firmware.
      
      The code in early_init_devtree() to copy boot_command_line into cmd_line
      was added in commit 817c21ad "Get kernel command line accross OPAL
      takeover", and AFAIK is only used by takeover, so should also be
      removed.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e2500be2
  7. 24 Jun, 2014 3 commits