1. 25 5月, 2018 1 次提交
    • M
      powerpc/chrp/pci: Make some functions static · 910be6be
      Mathieu Malaterre 提交于
      These functions can all be static, make it so. Fix warnings treated as
      errors with W=1:
      
        arch/powerpc/platforms/chrp/pci.c:34:5: error: no previous prototype for ‘gg2_read_config’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/pci.c:61:5: error: no previous prototype for ‘gg2_write_config’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/pci.c:97:5: error: no previous prototype for ‘rtas_read_config’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/chrp/pci.c:112:5: error: no previous prototype for ‘rtas_write_config’ [-Werror=missing-prototypes]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      910be6be
  2. 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
  3. 23 8月, 2017 1 次提交
  4. 04 1月, 2013 1 次提交
    • G
      POWERPC: drivers: remove __dev* attributes. · cad5cef6
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cad5cef6
  5. 12 7月, 2011 1 次提交
  6. 10 6月, 2011 1 次提交
  7. 21 5月, 2009 1 次提交
  8. 16 12月, 2008 2 次提交
    • J
      powerpc: Introduce ppc_pci_flags accessors · 7fe519c2
      Josh Boyer 提交于
      Currently there are a number of platforms that open code access to
      the ppc_pci_flags global variable.  However, that variable is not
      present if CONFIG_PCI is not set, which can lead to a build break.
      
      This introduces a number of accessor functions that are defined
      to be empty in the case of CONFIG_PCI being disabled.  The
      various platform files in the kernel are updated to use these.
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7fe519c2
    • N
      powerpc/chrp: Add missing of_node_put in pci.c · 29e931c0
      Nicolas Palix 提交于
      of_node_put is needed before discarding a value received from
      of_find_node_by_name, eg in error handling code or when the device
      node is no longer used.
      
      The semantic match that catches the bug is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression struct device_node *n;
      position p1, p2;
      statement S1,S2;
      expression E,E1;
      expression *ptr != NULL;
      @@
      
      (
      if (!(n@p1 = of_find_node_by_name(...))) S1
      |
      n@p1 = of_find_node_by_name(...)
      )
      <... when != of_node_put(n)
          when != if (...) { <+... of_node_put(n) ...+> }
          when != true !n  || ...
          when != n = E
          when != E = n
      if (!n || ...) S2
      ...>
      (
        return \(0\|<+...n...+>\|ptr\);
      |
      return@p2 ...;
      |
      n = E1
      |
      E1 = n
      )
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s of_find_node_by_name %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NNicolas Palix <npalix@diku.dk>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      29e931c0
  9. 15 10月, 2008 2 次提交
  10. 22 7月, 2008 1 次提交
  11. 25 1月, 2008 1 次提交
  12. 20 12月, 2007 1 次提交
  13. 10 12月, 2007 1 次提交
  14. 23 8月, 2007 1 次提交
  15. 22 8月, 2007 1 次提交
    • O
      [POWERPC] Advertise correct IDE mode on Pegasos2 · 556ecf9b
      Olaf Hering 提交于
      The built-in IDE controller is configured in legacy mode, but the PCI
      registers advertise native mode.  Force the PCI class into legacy
      mode. This allows pata_via to access two drives.
      
      The Pegasos specific irq enforcement in the via82cxxx driver must stay
      because there is apparently no generic way to setup irq per channel.
      
      Tested on Pegasos2 with firmware version 20040810, and two IDE disks.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      556ecf9b
  16. 17 8月, 2007 1 次提交
  17. 24 7月, 2007 1 次提交
  18. 29 6月, 2007 2 次提交
  19. 07 5月, 2007 1 次提交
  20. 24 4月, 2007 2 次提交
  21. 13 4月, 2007 2 次提交
  22. 04 12月, 2006 1 次提交
    • B
      [POWERPC] Make pci_read_irq_line the default · f90bb153
      Benjamin Herrenschmidt 提交于
      This patch reworks the way IRQs are fixed up on PCI for arch powerpc.
      
      It makes pci_read_irq_line() called by default in the PCI code for
      devices that are probed, and add an optional per-device fixup in
      ppc_md for platforms that really need to correct what they obtain
      from pci_read_irq_line().
      
      It also removes ppc_md.irq_bus_setup which was only used by pSeries
      and should not be needed anymore.
      
      I've also removed the pSeries s7a workaround as it can't work with
      the current interrupt code anyway. I'm trying to get one of these
      machines working so I can test a proper fix for that problem.
      
      I also haven't updated the old-style fixup code from 85xx_cds.c
      because it's actually buggy :) It assigns pci_dev->irq hard coded
      numbers which is no good with the new IRQ mapping code. It should
      at least use irq_create_mapping(NULL, hard_coded_number); and possibly
      also set_irq_type() to set them as level low.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f90bb153
  23. 31 7月, 2006 1 次提交
  24. 07 7月, 2006 1 次提交
  25. 03 7月, 2006 1 次提交
    • B
      [POWERPC] Add new interrupt mapping core and change platforms to use it · 0ebfff14
      Benjamin Herrenschmidt 提交于
      This adds the new irq remapper core and removes the old one.  Because
      there are some fundamental conflicts with the old code, like the value
      of NO_IRQ which I'm now setting to 0 (as per discussions with Linus),
      etc..., this commit also changes the relevant platform and driver code
      over to use the new remapper (so as not to cause difficulties later
      in bisecting).
      
      This patch removes the old pre-parsing of the open firmware interrupt
      tree along with all the bogus assumptions it made to try to renumber
      interrupts according to the platform. This is all to be handled by the
      new code now.
      
      For the pSeries XICS interrupt controller, a single remapper host is
      created for the whole machine regardless of how many interrupt
      presentation and source controllers are found, and it's set to match
      any device node that isn't a 8259.  That works fine on pSeries and
      avoids having to deal with some of the complexities of split source
      controllers vs. presentation controllers in the pSeries device trees.
      
      The powerpc i8259 PIC driver now always requests the legacy interrupt
      range. It also has the feature of being able to match any device node
      (including NULL) if passed no device node as an input. That will help
      porting over platforms with broken device-trees like Pegasos who don't
      have a proper interrupt tree.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0ebfff14
  26. 01 7月, 2006 1 次提交
  27. 28 6月, 2006 1 次提交
  28. 05 4月, 2006 1 次提交
  29. 07 2月, 2006 1 次提交
    • O
      [PATCH] powerpc: add refcounting to setup_peg2 and of_get_pci_address · d60dcd94
      Olaf Hering 提交于
      setup_peg2 must do some refcounting.
      of_get_pci_address may need to drop the node
      
      	Pegasos l2cr : L2 cache was not active, activating
      	PCI bus 0 controlled by pci at 80000000
      	Badness in kref_get at /home/olaf/kernel/olh/ppc64/linux-2.6.16-rc2-olh/lib/kref.c:32
      	Call Trace:
      	[C037BD00] [C0007934] show_stack+0x5c/0x184 (unreliable)
      	[C037BD30] [C000E068] program_check_exception+0x184/0x584
      	[C037BD90] [C000F5F0] ret_from_except_full+0x0/0x4c
      	--- Exception: 700 at kref_get+0xc/0x24
      	    LR = of_node_get+0x24/0x3c
      	[C037BE50] [C004FD94] __pte_alloc_kernel+0x64/0x80 (unreliable)
      	[C037BE70] [C000CA18] of_get_parent+0x34/0x58
      	[C037BE90] [C0009B18] of_get_address+0x24/0x174
      	[C037BED0] [C000A108] of_address_to_resource+0x24/0x68
      	[C037BF00] [C038B128] chrp_find_bridges+0x114/0x470
      	[C037BF90] [C038AE48] chrp_setup_arch+0x1fc/0x32c
      	[C037BFB0] [C03849B0] setup_arch+0x144/0x188
      	[C037BFD0] [C037C45C] start_kernel+0x34/0x1a8
      	[C037BFF0] [000037A0] 0x37a0
      	Badness in kref_get at /home/olaf/kernel/olh/ppc64/linux-2.6.16-rc2-olh/lib/kref.c:32
      	Call Trace:
      	[C037BC90] [C0007934] show_stack+0x5c/0x184 (unreliable)
      	[C037BCC0] [C000E068] program_check_exception+0x184/0x584
      	[C037BD20] [C000F5F0] ret_from_except_full+0x0/0x4c
      	--- Exception: 700 at kref_get+0xc/0x24
      	    LR = of_node_get+0x24/0x3c
      	[C037BDE0] [00000000] 0x0 (unreliable)
      	[C037BE00] [C000CA18] of_get_parent+0x34/0x58
      	[C037BE20] [C0009CE8] of_translate_address+0x2c/0x2fc
      	[C037BEA0] [C0009FE8] __of_address_to_resource+0x30/0xc4
      	[C037BED0] [C000A130] of_address_to_resource+0x4c/0x68
      	[C037BF00] [C038B128] chrp_find_bridges+0x114/0x470
      	[C037BF90] [C038AE48] chrp_setup_arch+0x1fc/0x32c
      	[C037BFB0] [C03849B0] setup_arch+0x144/0x188
      	[C037BFD0] [C037C45C] start_kernel+0x34/0x1a8
      	[C037BFF0] [000037A0] 0x37a0
      	PCI bus 0 controlled by pci at c0000000
      	Top of RAM: 0x10000000, Total RAM: 0x10000000
      Signed-off-by: NOlaf Hering <olh@suse.de>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d60dcd94
  30. 14 1月, 2006 1 次提交
  31. 26 10月, 2005 1 次提交
  32. 20 10月, 2005 1 次提交
  33. 19 9月, 2005 1 次提交
  34. 26 6月, 2005 1 次提交
  35. 25 4月, 2005 1 次提交