1. 17 Nov, 2016 16 commits
  2. 14 Nov, 2016 24 commits
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert storcenter_defconfig to use libata PATA drivers · 1aed61f9
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts storcenter_defconfig to use libata PATA
      drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      1aed61f9
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert pseries_defconfig to use libata PATA drivers · 80269fe4
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts pseries_defconfig to use libata PATA
      drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      80269fe4
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert ppc6xx_defconfig to use libata PATA drivers · 7f10fe36
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts ppc6xx_defconfig to use libata PATA
      drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      7f10fe36
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert ppc64e_defconfig to use libata PATA drivers · 4a0b4bfe
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts ppc64e_defconfig to use libata PATA
      drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      4a0b4bfe
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert ppc64_defconfig to use libata PATA drivers · 7ddf3db3
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts ppc64_defconfig to use libata PATA
      drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      7ddf3db3
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert pmac32_defconfig to use libata PATA drivers · b0d3a074
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts pmac32_defconfig to use libata PATA
      drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      b0d3a074
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: disable IDE subsystem in pasemi_defconfig · 23bf36cd
      Bartlomiej Zolnierkiewicz authored
      This patch disables deprecated IDE subsystem in pasemi_defconfig
      (no IDE host drivers are selected in this config so there is no valid
      reason to enable IDE subsystem itself).
      
      Cc: Olof Johansson <olof@lixom.net>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      23bf36cd
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert maple_defconfig to use libata PATA drivers · c1f9d293
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts maple_defconfig to use libata PATA
      drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      c1f9d293
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert g5_defconfig to use libata PATA drivers · b10fd396
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts g5_defconfig to use libata PATA drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      b10fd396
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert chrp32_defconfig to use libata PATA drivers · f22cc4d7
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts chrp32_defconfig to use libata PATA
      drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      f22cc4d7
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert cell_defconfig to use libata PATA drivers · 8020c122
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts cell_defconfig to use libata PATA drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      8020c122
    • Bartlomiej Zolnierkiewicz's avatar
      powerpc: convert amigaone_defconfig to use libata PATA drivers · 67f6d665
      Bartlomiej Zolnierkiewicz authored
      IDE subsystem has been deprecated since 2009 and the majority
      (if not all) of Linux distributions have switched to use
      libata for ATA support exclusively.  However there are still
      some users (mostly old or/and embedded non-x86 systems) that
      have not converted from using IDE subsystem to libata PATA
      drivers.  This doesn't seem to be good thing in the long-term
      for Linux as while there is less and less PATA systems left
      in use:
      
      * testing efforts are divided between two subsystems
      
      * having duplicate drivers for same hardware confuses users
      
      This patch converts amigaone_defconfig to use libata PATA
      drivers.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      67f6d665
    • Peter Senna Tschudin's avatar
      selftests/powerpc: Return false instead of -1 in require_paranoia_below() · 0e27d27e
      Peter Senna Tschudin authored
      Returning a negative value for a boolean function seem to have the
      undesired effect of returning true. require_paranoia_below() is a
      boolean function, but the variable used to store the return value is an
      integer, receiving -1 or 0. This patch converts rc to bool, replaces -1
      by false, and 0 by true.
      
      mpe: This wasn't exhibiting in practice because the common case, where
      we do the comparison of the desired level vs the current value, was
      being compiled into a computation based on the result of the comparison,
      ie. it wasn't using the default -1 value at all. However that was just
      luck and the code is still wrong.
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarAndrew Shadura <andrew.shadura@collabora.co.uk>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      0e27d27e
    • Johan Hovold's avatar
      powerpc/pci/rpadlpar: Fix device reference leaks · 99e5cde5
      Johan Hovold authored
      Make sure to drop any device reference taken by vio_find_node() when
      adding and removing virtual I/O slots.
      
      Fixes: 5eeb8c63 ("[PATCH] PCI Hotplug: rpaphp: Move VIO registration")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      99e5cde5
    • Johan Hovold's avatar
      powerpc/vio: Clarify vio_find_node() reference counting · e8cfb7e7
      Johan Hovold authored
      Add comment clarifying that vio_find_node() takes a reference to the
      embedded struct device which needs to be dropped after use.
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      e8cfb7e7
    • Johan Hovold's avatar
      powerpc/ibmebus: Fix further device reference leaks · 815a7141
      Johan Hovold authored
      Make sure to drop any reference taken by bus_find_device() when creating
      devices during init and driver registration.
      
      Fixes: 55347cc9 ("[POWERPC] ibmebus: Add device creation and bus probing based on of_device")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      815a7141
    • Johan Hovold's avatar
      powerpc/ibmebus: Fix device reference leaks in sysfs interface · fe0f3168
      Johan Hovold authored
      Make sure to drop any reference taken by bus_find_device() in the sysfs
      callbacks that are used to create and destroy devices based on
      device-tree entries.
      
      Fixes: 6bccf755 ("[POWERPC] ibmebus: dynamic addition/removal of adapters, some code cleanup")
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      fe0f3168
    • Jack Miller's avatar
      powerpc/powernv: Simplify searching for compatible device nodes · 9e4f51bd
      Jack Miller authored
      This condenses the opal node searching into a single function that finds
      all compatible nodes, instead of just searching the ibm,opal children,
      for ipmi, flash, and prd similar to how opal-i2c nodes are found.
      Signed-off-by: default avatarJack Miller <jack@codezen.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      9e4f51bd
    • Michael Neuling's avatar
      powerpc: Revert Load Monitor Register Support · 29a969b7
      Michael Neuling authored
      Load monitored is no longer supported on POWER9 so let's remove the
      code.
      
      This reverts commit bd3ea317 ("powerpc: Load Monitor Register
      Support").
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      29a969b7
    • Michael Neuling's avatar
      selftests/powerpc: Revert Load Monitor Register Tests · 7c65856b
      Michael Neuling authored
      Load monitored won't be supported in POWER9, so PPC_FEATURE2_ARCH_3_00
      (in HWCAP2) will no longer imply Load monitor support.
      
      These Load monitored tests are enabled by PPC_FEATURE2_ARCH_3_00 so
      they are now bogus and need to be removed.
      
      This reverts commit 16c19a2e ("selftests/powerpc: Load Monitor
      Register Tests").
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      7c65856b
    • Michael Ellerman's avatar
      powerpc/configs: Drop REISERFS from pseries & powernv · 7a53ef5e
      Michael Ellerman authored
      No one uses reiserfs much these days, or is likely to in future. So drop
      it from pseries and powernv defconfigs to save time and space. It's
      still enabled in ppc64_defconfig so we get some build coverage.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      7a53ef5e
    • Elimar Riesebieter's avatar
      macintosh: Remove dependency on IDE_GD_ATA if ADB_PMU_LED_DISK is selected · 0e865a80
      Elimar Riesebieter authored
      We can use the front led of powerbooks/ibooks to visualize disk activity
      without the deprecated IDE_GD_ATA.
      Signed-off-by: default avatarElimar Riesebieter <riesebie@lxtec.de>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      0e865a80
    • Balbir Singh's avatar
      powerpc/hash64: Be more careful when generating tlbiel · f923efbc
      Balbir Singh authored
      In ISA v2.05, the tlbiel instruction takes two arguments, RB and L:
      
      tlbiel RB,L
      
      +---------+---------+----+---------+---------+---------+----+
      |    31   |    /    | L  |    /    |    RB   |   274   | /  |
      | 31 - 26 | 25 - 22 | 21 | 20 - 16 | 15 - 11 |  10 - 1 | 0  |
      +---------+---------+----+---------+---------+---------+----+
      
      In ISA v2.06 tlbiel takes only one argument, RB:
      
      tlbiel RB
      
      +---------+---------+---------+---------+---------+----+
      |    31   |    /    |    /    |    RB   |   274   | /  |
      | 31 - 26 | 25 - 21 | 20 - 16 | 15 - 11 |  10 - 1 | 0  |
      +---------+---------+---------+---------+---------+----+
      
      And in ISA v3.00 tlbiel takes five arguments:
      
      tlbiel RB,RS,RIC,PRS,R
      
      +---------+---------+----+---------+----+----+---------+---------+----+
      |    31   |    RS   | /  |   RIC   |PRS | R  |    RB   |   274   | /  |
      | 31 - 26 | 25 - 21 | 20 | 19 - 18 | 17 | 16 | 15 - 11 |  10 - 1 | 0  |
      +---------+---------+----+---------+----+----+---------+---------+----+
      
      However the assembler also accepts "tlbiel RB", and generates
      "tlbiel RB,r0,0,0,0".
      
      As you can see above the L field from the v2.05 encoding overlaps with the
      reserved field of the v2.06 encoding, and the low bit of the RS field of the
      v3.00 encoding.
      
      Currently in __tlbiel() we generate two tlbiel instructions manually using hex
      constants. In the first case, for MMU_PAGE_4K, we generate "tlbiel RB,0", which
      is safe in all cases, because the L bit is zero.
      
      However in the default case we generate "tlbiel RB,1", therefore setting bit 21
      to 1.
      
      This is not an actual bug on v2.06 processors, because the CPU ignores the value
      of the reserved field. However software is supposed to encode the reserved
      fields as zero to enable forward compatibility.
      
      On v3.00 processors setting bit 21 to 1 and no other bits of RS, means we are
      using r1 for the value of RS.
      
      Although it's not obvious, the code sets the IS field (bits 10-11) to 0 (by
      omission), and L=1, in the va value, which is passed as RB. We also pass R=0 in
      the instruction.
      
      The combination of IS=0, L=1 and R=0 means the value of RS is not used, so even
      on ISA v3.00 there is no actual bug.
      
      We should still fix it, as setting a reserved bit on v2.06 is naughty, and we
      are only avoiding a bug on v3.00 by accident rather than design. Use
      ASM_FTR_IFSET() to generate the single argument form on ISA v2.06 and later, and
      the two argument form on pre v2.06.
      
      Although there may be very old toolchains which don't understand tlbiel, we have
      other code in the tree which has been using tlbiel for over five years, and no
      one has reported any build failures, so just let the assembler generate the
      instructions.
      Signed-off-by: default avatarBalbir Singh <bsingharora@gmail.com>
      [mpe: Rewrite change log, use IFSET instead of IFCLR]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      f923efbc
    • Michael Ellerman's avatar
      powerpc/book3s64: Always build for power4 or later · 3a849815
      Michael Ellerman authored
      When we're not compiling for a specific CPU, ie. none of the
      CONFIG_POWERx_CPU options are set, and CONFIG_GENERIC_CPU *is* set, we
      currently don't pass any -mcpu option to the compiler. This means the
      compiler builds for a "generic" Power CPU.
      
      But back in 2014 we dropped support for pre power4 CPUs in commit
      468a3302 ("powerpc: Drop support for pre-POWER4 cpus").
      
      Given that, there's no point in building the kernel to run on pre power4
      cpus. So update the flags we pass to the compiler when
      CONFIG_GENERIC_CPU is set, to specify -mcpu=power4.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      3a849815