1. 02 8月, 2018 1 次提交
  2. 19 1月, 2018 1 次提交
  3. 16 1月, 2018 1 次提交
    • C
      powerpc/32s: Fix compile error with CONFIG_PPC_PTDUMP · 94d3084a
      Christophe Leroy 提交于
      This patch remove CONFIG_PPC_HTDUMP if not PPC_BOOK3S_64 to avoid
      below compile failure on BOOK3S_32:
      
        In file included from arch/powerpc/mm/dump_hashpagetable.c:27:0:
        ./arch/powerpc/include/asm/plpar_wrappers.h: In function 'get_cede_latency_hint':
        ./arch/powerpc/include/asm/plpar_wrappers.h:27:2: error: implicit declaration of function 'get_lppaca' [-Werror=implicit-function-declaration]
        ...
        arch/powerpc/mm/dump_hashpagetable.c: At top level:
        arch/powerpc/mm/dump_hashpagetable.c:69:13: error: 'SLB_VSID_B' undeclared here (not in a function)
        ...
        arch/powerpc/mm/dump_hashpagetable.c:506:38: error: 'VMEMMAP_BASE' undeclared (first use in this function)
        arch/powerpc/mm/dump_hashpagetable.c:506:35: error: assignment makes integer from pointer without a cast [-Werror]
      
      Fixes: dd5ac03e ("powerpc/mm: Fix page table dump build on non-Book3S")
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      [mpe: Trim change log]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      94d3084a
  4. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  5. 22 10月, 2017 1 次提交
    • M
      powerpc: Disable the fast-endian switch syscall by default · 727f1361
      Michael Ellerman 提交于
      Back in 2008 we added support for "fast little-endian switch" in the
      syscall path. This added a special case syscall number 0x1ebe, which
      is caught very early in the system call exception and switches endian
      with as little overhead as possible. See commit 745a14cc
      ("[POWERPC] Add fast little-endian switch system call") for full
      details.
      
      Although it is fast, it's also completely non standard. The "syscall
      number" is out of the range of normal syscalls, it can't be traced or
      audited, and it's a bit of a wart. To the best of our knowledge it was
      only used by one program, now long since discontinued.
      
      So in an effort to shake out any current users, put it behind a config
      option, and make it default n. If anyone *is* using it they can
      quickly reinstate it with a rebuild, and we can flip it to default y.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      727f1361
  6. 15 2月, 2017 2 次提交
    • B
      powerpc/xmon: Enable disassembly files (compilation changes) · 5b102782
      Balbir Singh 提交于
      After updating ppc-dis.c, ppc-opc.c and ppc.h the following changes were
      made to enable compilation and working of xmon:
      
        1.  Remove all disassembler_info
        2.  Use xmon's printf/print_address to output data and addresses
            respectively.
        3.  All bfd_* types and casts have been removed.
        4.  Optimizations related to opcd_indices have been removed.
        5.  The dialect is set based on cpu features.
        6.  PPC_OPCODE_CLASSIC is no longer supported in the new
            disassembler.
        7.  VLE opcode parsing and printing has been stripped.
        8.  Coding style conventions used for those routines has
            been retained and it does not match our CodingStyle.
        9.  The highest supported dialect is POWER9.
        10. Defined ATTRIBUTE_UNUSED in ppc-dis.c.
        11. Defined _(x) in ppc-dis.c.
      
      Finally, we remove the dependency on BROKEN so that XMON_DISASSEMBLY can
      be enabled again.
      Signed-off-by: NBalbir Singh <bsingharora@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      5b102782
    • B
      powerpc/xmon: Update ppc-dis/opc.c and ppc.h · cc7639ce
      Balbir Singh 提交于
      Upgrade ppc-opc.c, ppc-dis.c and ppc.h to the versions belonging to the
      following binutils commit:
      
        65b650b4c7463f4508bed523c24ab0031a5ae5cd
        * ppc-dis.c (print_insn_powerpc): Don't skip all operands after
          setting skip_optional.
      
      That is the last version of those files that were licensed under GPLv2.
      
      This leaves the code in a state that does not compile, because the
      binutils code needs to be tweaked to work in the kernel. We don't fix
      that in this commit, because we want to import more binutils changes in
      subsequent commits. So for now we mark XMON_DISASSEMBLY as BROKEN, so it
      can't be built.
      Signed-off-by: NBalbir Singh <bsingharora@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      cc7639ce
  7. 02 2月, 2017 1 次提交
  8. 01 12月, 2016 1 次提交
    • M
      powerpc/mm: Fix page table dump build on non-Book3S · dd5ac03e
      Michael Ellerman 提交于
      In the recent commit 1515ab93 ("powerpc/mm: Dump hash table") we
      added code to dump the hage page table. Currently this can be selected
      to build on any platform. However it breaks the build if we're building
      for a non-Book3S platform, because none of the hash page table related
      defines and so on exist. So restrict it to building only on Book3S.
      
      Similarly in commit 8eb07b18 ("powerpc/mm: Dump linux pagetables")
      we added code to dump the Linux page tables, which uses some constants
      which are only defined on Book3S - so guard those with an #ifdef.
      
      Fixes: 1515ab93 ("powerpc/mm: Dump hash table")
      Fixes: 8eb07b18 ("powerpc/mm: Dump linux pagetables")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      dd5ac03e
  9. 17 11月, 2016 1 次提交
  10. 01 8月, 2016 2 次提交
  11. 15 7月, 2016 1 次提交
    • M
      powerpc/pseries: HVC early debug options should depend on HVC_CONSOLE · 23697760
      Michael Ellerman 提交于
      The pseries HVC early debug options, CONFIG_PPC_EARLY_DEBUG_LPAR and
      CONFIG_PPC_EARLY_DEBUG_LPAR_HVSI both require code that is part of the
      hvc driver. If we turn them on but not CONFIG_HVC_CONSOLE then we get:
      
        arch/powerpc/kernel/built-in.o: In function `.udbg_early_init':
        arch/powerpc/kernel/built-in.o:(.debug_addr+0x9a00): undefined reference to `udbg_init_debug_lpar'
      
      Similarly for HVSI. So make them both depend on CONFIG_HVC_CONSOLE.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      23697760
  12. 09 7月, 2016 1 次提交
  13. 01 5月, 2016 1 次提交
  14. 09 1月, 2016 1 次提交
  15. 27 12月, 2015 1 次提交
  16. 11 5月, 2015 1 次提交
  17. 07 4月, 2015 1 次提交
  18. 17 3月, 2015 1 次提交
  19. 28 7月, 2014 1 次提交
    • A
      KVM: PPC: Remove 440 support · b2677b8d
      Alexander Graf 提交于
      The 440 target hasn't been properly functioning for a few releases and
      before I was the only one who fixes a very serious bug that indicates to
      me that nobody used it before either.
      
      Furthermore KVM on 440 is slow to the extent of unusable.
      
      We don't have to carry along completely unused code. Remove 440 and give
      us one less thing to worry about.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      b2677b8d
  20. 25 6月, 2014 1 次提交
    • M
      powerpc/powernv: Remove OPAL v1 takeover · e2500be2
      Michael Ellerman 提交于
      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: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e2500be2
  21. 11 6月, 2014 1 次提交
  22. 05 7月, 2013 1 次提交
  23. 20 6月, 2013 1 次提交
  24. 08 5月, 2013 1 次提交
  25. 10 7月, 2012 1 次提交
    • A
      powerpc: IOMMU fault injection · d6b9a81b
      Anton Blanchard 提交于
      Add the ability to inject IOMMU faults. We enable this per device
      via a fail_iommu sysfs property, similar to fault injection on other
      subsystems.
      
      An example:
      
      ...
      0003:01:00.1 Ethernet controller: Emulex Corporation OneConnect 10Gb NIC (be3) (rev 02)
      
      To inject one error to this device:
      
      echo 1 > /sys/bus/pci/devices/0003:01:00.1/fail_iommu
      echo 1 > /sys/kernel/debug/fail_iommu/probability
      echo 1 > /sys/kernel/debug/fail_iommu/times
      
      As feared, the first failure injected on the be3 results in an
      unrecoverable error, taking down both functions of the card
      permanently:
      
      be2net 0003:01:00.1: Unrecoverable error in the card
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d6b9a81b
  26. 30 3月, 2012 1 次提交
  27. 27 2月, 2012 1 次提交
  28. 28 11月, 2011 1 次提交
    • S
      powerpc: Implement CONFIG_STRICT_DEVMEM · 1d54cf2b
      sukadev@linux.vnet.ibm.com 提交于
      As described in the help text in the patch, this token restricts general
      access to /dev/mem as a way of increasing the security. Specifically, access
      to exclusive IOMEM and kernel RAM is denied unless CONFIG_STRICT_DEVMEM is
      set to 'n'.
      
      Implement the 'devmem_is_allowed()' interface for Powerpc. It will be
      called from range_is_allowed() when userpsace attempts to access /dev/mem.
      
      This patch is based on an earlier patch from Steve Best and with input from
      Paul Mackerras and Scott Wood.
      
      [BenH] Fixed a typo or two and removed the generic change which should
             be submitted as a separate patch
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      1d54cf2b
  29. 20 9月, 2011 3 次提交
  30. 29 6月, 2011 1 次提交
    • B
      powerpc/pseries: Re-implement HVSI as part of hvc_vio · 4d2bb3f5
      Benjamin Herrenschmidt 提交于
      On pseries machines, consoles are provided by the hypervisor using
      a low level get_chars/put_chars type interface. However, this is
      really just a transport to the service processor which implements
      them either as "raw" console (networked consoles, HMC, ...) or as
      "hvsi" serial ports.
      
      The later is a simple packet protocol on top of the raw character
      interface that is supposed to convey additional "serial port" style
      semantics. In practice however, all it does is provide a way to
      read the CD line and set/clear our DTR line, that's it.
      
      We currently implement the "raw" protocol as an hvc console backend
      (/dev/hvcN) and the "hvsi" protocol using a separate tty driver
      (/dev/hvsi0).
      
      However this is quite impractical. The arbitrary difference between
      the two type of devices has been a major source of user (and distro)
      confusion. Additionally, there's an additional mini -hvsi implementation
      in the pseries platform code for our low level debug console and early
      boot kernel messages, which means code duplication, though that low
      level variant is impractical as it's incapable of doing the initial
      protocol negociation to establish the link to the FSP.
      
      This essentially replaces the dedicated hvsi driver and the platform
      udbg code completely by extending the existing hvc_vio backend used
      in "raw" mode so that:
      
       - It now supports HVSI as well
       - We add support for hvc backend providing tiocm{get,set}
       - It also provides a udbg interface for early debug and boot console
      
      This is overall less code, though this will only be obvious once we
      remove the old "hvsi" driver, which is still available for now. When
      the old driver is enabled, the new code still kicks in for the low
      level udbg console, replacing the old mini implementation in the platform
      code, it just doesn't provide the higher level "hvc" interface.
      
      In addition to producing generally simler code, this has several benefits
      over our current situation:
      
       - The user/distro only has to deal with /dev/hvcN for the hypervisor
      console, avoiding all sort of confusion that has plagued us in the past
      
       - The tty, kernel and low level debug console all use the same code
      base which supports the full protocol establishment process, thus the
      console is now available much earlier than it used to be with the
      old HVSI driver. The kernel console works much earlier and udbg is
      available much earlier too. Hackers can enable a hard coded very-early
      debug console as well that works with HVSI (previously that was only
      supported for the "raw" mode).
      
      I've tried to keep the same semantics as hvsi relative to how I react
      to things like CD changes, with some subtle differences though:
      
       - I clear DTR on close if HUPCL is set
      
       - Current hvsi triggers a hangup if it detects a up->down transition
         on CD (you can still open a console with CD down). My new implementation
         triggers a hangup if the link to the FSP is severed, and severs it upon
         detecting a up->down transition on CD.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4d2bb3f5
  31. 25 5月, 2011 2 次提交
  32. 06 5月, 2011 1 次提交
  33. 15 6月, 2010 1 次提交
  34. 06 5月, 2010 1 次提交
  35. 13 12月, 2009 1 次提交