1. 21 7月, 2018 1 次提交
  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. 01 11月, 2017 1 次提交
    • T
      ia64: Update fsyscall gettime to use modern vsyscall_update · d4d1fc61
      Tony Luck 提交于
      John Stultz provided the outline for this patch back in May 2014 here:
      
      	http://patches.linaro.org/patch/30501/
      
      but I let this sit on the shelf for too long and in the intervening
      years almost every field in "struct timekeeper" was changed. So this
      is almost completely different from his original. Though the key change
      in arch/ia64/kernel/fsys.S remains the same.
      
      The core logic change with the updated vsyscall method is that we
      preserve the base nanosecond value in shifted nanoseconds, which
      allows us to avoid truncating and rounding up to the next nanosecond
      every tick to avoid inconsistencies.
      
      Thus the logic moved from
      nsec = ((cycle_delta * mult)>>shift) + base_nsec;
      to
      nsec = ((cycle_delta * mult) + base_snsec) >> shift;
      
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: linux-ia64@vger.kernel.org
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      d4d1fc61
  4. 11 6月, 2015 1 次提交
    • L
      ia64: remove paravirt code · e55645ec
      Luis R. Rodriguez 提交于
      All the ia64 pvops code is now dead code since both
      xen and kvm support have been ripped out [0] [1]. Just
      that no one had troubled to rip this stuff out. The only
      useful remaining pieces were the old pvops docs but that
      was recently also generalized and moved out from ia64 [2].
      
      This has been run time tested on an ia64 Madison system.
      
      [0] 003f7de6 "KVM: ia64: remove" since v3.19-rc1
      [1] d52eefb4 "ia64/xen: Remove Xen support for ia64" since v3.14-rc1
      [2] "virtual: Documentation: simplify and generalize paravirt_ops.txt"
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      e55645ec
  5. 20 3月, 2013 1 次提交
    • E
      Fix broken fsys_getppid() · deb60015
      Eric W. Biederman 提交于
      In particular fsys_getppid always returns the ppid in the initial pid
      namespace so it does not work for a process in a pid namespace.
      
      Fix from Eric Biederman just removes the fast system call path.
      While it is a little bit sad to see another one of these bite
      the dust ... I can't imagine that getppid() is really on any
      real applications critical path.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      deb60015
  6. 28 1月, 2013 1 次提交
    • F
      cputime: Generic on-demand virtual cputime accounting · abf917cd
      Frederic Weisbecker 提交于
      If we want to stop the tick further idle, we need to be
      able to account the cputime without using the tick.
      
      Virtual based cputime accounting solves that problem by
      hooking into kernel/user boundaries.
      
      However implementing CONFIG_VIRT_CPU_ACCOUNTING require
      low level hooks and involves more overhead. But we already
      have a generic context tracking subsystem that is required
      for RCU needs by archs which plan to shut down the tick
      outside idle.
      
      This patch implements a generic virtual based cputime
      accounting that relies on these generic kernel/user hooks.
      
      There are some upsides of doing this:
      
      - This requires no arch code to implement CONFIG_VIRT_CPU_ACCOUNTING
      if context tracking is already built (already necessary for RCU in full
      tickless mode).
      
      - We can rely on the generic context tracking subsystem to dynamically
      (de)activate the hooks, so that we can switch anytime between virtual
      and tick based accounting. This way we don't have the overhead
      of the virtual accounting when the tick is running periodically.
      
      And one downside:
      
      - There is probably more overhead than a native virtual based cputime
      accounting. But this relies on hooks that are already set anyway.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      abf917cd
  7. 17 5月, 2012 2 次提交
  8. 29 3月, 2012 1 次提交
  9. 16 3月, 2012 1 次提交
  10. 16 9月, 2010 1 次提交
  11. 10 9月, 2010 1 次提交
    • T
      [IA64] fix siglock · f574c843
      Tony Luck 提交于
      When ia64 converted to using ticket locks, an inline implementation
      of trylock/unlock in fsys.S was missed.  This was not noticed because
      in most circumstances it simply resulted in using the slow path because
      the siglock was apparently not available (under old spinlock rules).
      
      Problems occur when the ticket spinlock has value 0x0 (when first
      initialised, or when it wraps around). At this point the fsys.S
      code acquires the lock (changing the 0x0 to 0x1. If another process
      attempts to get the lock at this point, it will change the value from
      0x1 to 0x2 (using new ticket lock rules). Then the fsys.S code will
      free the lock using old spinlock rules by writing 0x0 to it. From
      here a variety of bad things can happen.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      f574c843
  12. 27 3月, 2009 3 次提交
  13. 10 4月, 2008 1 次提交
    • P
      [IA64] fix getpid and set_tid_address fast system calls for pid namespaces · 96ded9da
      Pavel Emelyanov 提交于
      The sys_getpid() and sys_set_tid_address() behavior changed from
      
      	return current->tgid
      
      to
      
      	struct pid *pid;
      	pid = current->pids[PIDTYPE_PID].pid;
      	return pid->numbers[pid->level].nr;
      
      But the fast system calls on ia64 still operate the old way.  Patch them
      appropriately to let ia64 work with pid namespaces.  Besides, this is one more
      step in deprecating of pid and tgid on task_struct.
      
      The fsys_getppid() is to be patched as well, but its logic is much
      more complex now, so I will make it later.
      
      One thing I'm not 100% sure is the trick with the IA64_UPID_SHIFT.  On order
      to access the pid->level's element of an array I have to perform the following
      calculations
      
      	pid + sizeof(struct upid) * pid->level
      
      The problem is that ia64 can only multiply float point registers, while all
      the offsets I have in code are in rXX ones.  Fortunately, the sizeof(struct
      upid) is 32 bytes on ia64 (and is very unlikely to ever change), so the
      calculations get simpler:
      
      	pid + pid->level << 5
      
      So, I introduce the IA64_UPID_SHIFT and use the shl instruction.  I also
      looked at how gcc compiles the similar place and found that it makes it with
      shift as well.  Is this OK to do so?
      
      Tested with ski emulator with 2.6.24 kernel, but fits 2.6.25-rc4 and
      2.6.25-rc4-mm1 as well.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Cc: David Mosberger-Tang <davidm@hpl.hp.com>
      Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Amy Griffis <amy.griffis@hp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      96ded9da
  14. 11 3月, 2008 1 次提交
    • H
      [IA64] cleanup and improve fsys_gettimeofday · 4fe01c68
      Hidetoshi Seto 提交于
      This patch does:
      
       - Remove outdated comments (which someday I marked with "?").
       - Reassemble instructions to fit them in fewer bundles.
       - If McKinley Errata 9 workaround is not needed, the workaround
         bundles will be patched out with NOPs. However it also not
         needed to have a totally NOP bundle (nop * 3) before branch.
      
      As a result, this makes the code path 3 (or 2) bundles shorter
      (and remove 1 unnecessary stop bit). It seems to be 1% faster.
      
      (10sec loop test, with nojitter @ Madison 1.5GHz x 4)
      Before:
       CPU  0:  0.14 (usecs) (0 errors / 69598875 iterations)
       CPU  1:  0.14 (usecs) (0 errors / 69630721 iterations)
       CPU  2:  0.14 (usecs) (0 errors / 69607850 iterations)
       CPU  3:  0.14 (usecs) (0 errors / 69619832 iterations)
      
      After:
       CPU  0:  0.14 (usecs) (0 errors / 70257728 iterations)
       CPU  1:  0.14 (usecs) (0 errors / 70309498 iterations)
       CPU  2:  0.14 (usecs) (0 errors / 70280639 iterations)
       CPU  3:  0.14 (usecs) (0 errors / 70260682 iterations)
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      4fe01c68
  15. 21 2月, 2008 1 次提交
    • H
      [IA64] VIRT_CPU_ACCOUNTING (accurate cpu time accounting) · b64f34cd
      Hidetoshi Seto 提交于
      This patch implements VIRT_CPU_ACCOUNTING for ia64,
      which enable us to use more accurate cpu time accounting.
      
      The VIRT_CPU_ACCOUNTING is an item of kernel config, which s390
      and powerpc arch have.  By turning this config on, these archs
      change the mechanism of cpu time accounting from tick-sampling
      based one to state-transition based one.
      
      The state-transition based accounting is done by checking time
      (cycle counter in processor) at every state-transition point,
      such as entrance/exit of kernel, interrupt, softirq etc.
      The difference between point to point is the actual time consumed
      during in the state. There is no doubt about that this value is
      more accurate than that of tick-sampling based accounting.
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      b64f34cd
  16. 21 7月, 2007 1 次提交
  17. 14 7月, 2007 1 次提交
    • H
      [IA64] ar.itc access must really be after xtime_lock.sequence has been read · 829a9996
      Hidetoshi Seto 提交于
      The ".acq" semantics of the load only apply w.r.t. other data access.
      Reading the clock (ar.itc) isn't a data access so strange things can
      happen here.  Specifically the read of ar.itc can be launched as soon
      as the read of xtime_lock.sequence is ISSUED.  Since this may cache
      miss, and that might cause a thread switch, and there may be cache
      contention for the line containing xtime_lock, it may be a long time
      before the actual value is returned, so the ar.itc value may be very
      stale.
      
      Move the consumption of r28 up before the read of ar.itc to make sure
      that we really have got the current value of xtime_lock.sequence
      before look at ar.itc.
      Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      829a9996
  18. 08 3月, 2007 1 次提交
    • F
      [IA64] fsys_getcpu for IA64 · 3bc207d2
      Fenghua Yu 提交于
      On 1.6GHz Montectio Tiger4, the following performance data is measured with
      kernel built with defconfig which has NUMA configured:
      
      Fastest sys_getcpu: 502 itc counts.
      Fastest fsys_getcpu: 28 itc counts.
      
      fsys_getcpu performance is largly impacted by whether data (node_to_cpu_map
      etc) is in cache. It can take fsys_getcpu up to ~150 itc counts in cold
      cache case.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      3bc207d2
  19. 01 3月, 2006 1 次提交
  20. 07 2月, 2006 1 次提交
  21. 14 1月, 2006 1 次提交
  22. 10 9月, 2005 1 次提交
  23. 10 6月, 2005 1 次提交
    • C
      [IA64] Fix race condition in the rt_sigprocmask fastcall · a2a64769
      Christoph Lameter 提交于
      current->blocked will be set to the value of current->thread_info->flags if the
      cmpxchg to update thread_info->flags fails. For performance reasons the store into
      current->blocked was placed in the cmpxchg loop. However, the cmpxchg overwrites the
      register holding the value to be stored. In the rare case of a retry the value of
      thread_info->flags will be written into current->blocked.
      
      The fix is to use another register so that the register containing the current->blocked
      value is not overwritten.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      a2a64769
  24. 06 5月, 2005 1 次提交
  25. 04 5月, 2005 1 次提交
    • D
      [IA64] fix ia64 syscall auditing · 446b8831
      David Woodhouse 提交于
      Attached is a patch against David's audit.17 kernel that adds checks
      for the TIF_SYSCALL_AUDIT thread flag to the ia64 system call and
      signal handling code paths.  The patch enables auditing of system
      calls set up via fsys_bubble_down, as well as ensuring that
      audit_syscall_exit() is called on return from sigreturn.
      
      Neglecting to check for TIF_SYSCALL_AUDIT at these points results in
      incorrect information in audit_context, causing frequent system panics
      when system call auditing is enabled on an ia64 system.
      
      I have tested this patch and have seen no problems with it.
      
      [Original patch from Amy Griffis ported to current kernel by David Woodhouse]
      
      From: Amy Griffis <amy.griffis@hp.com>
      From: David Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NChris Wright <chrisw@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      446b8831
  26. 29 4月, 2005 1 次提交
    • A
      [PATCH] fix ia64 syscall auditing · 3ac3ed55
      Amy Griffis 提交于
      Attached is a patch against David's audit.17 kernel that adds checks
      for the TIF_SYSCALL_AUDIT thread flag to the ia64 system call and
      signal handling code paths.The patch enables auditing of system
      calls set up via fsys_bubble_down, as well as ensuring that
      audit_syscall_exit() is called on return from sigreturn.
      
      Neglecting to check for TIF_SYSCALL_AUDIT at these points results in
      incorrect information in audit_context, causing frequent system panics
      when system call auditing is enabled on an ia64 system.
      Signed-off-by: NAmy Griffis <amy.griffis@hp.com>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      3ac3ed55
  27. 28 4月, 2005 2 次提交
    • D
      [IA64] Annotate fsys_bubble_down() with McKinley dispatch info. · fbf7192b
      David Mosberger-Tang 提交于
      This patch changes comments & formatting only.  There is no code
      change.
      Signed-off-by: NDavid Mosberger-Tang <davidm@hpl.hp.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      fbf7192b
    • D
      [IA64] Reschedule fsys_bubble_down(). · 1ba7be7d
      David Mosberger-Tang 提交于
      Improvements come from eliminating srlz.i, not scheduling AR/CR-reads
      too early (while there are others still pending), scheduling the
      backing-store switch as well as possible, splitting the BBB bundle
      into a MIB/MBB pair.
      
      Why is it safe to eliminate the srlz.i?  Observe
      that we used to clear bits ~PSR_PRESERVED_BITS in PSR.L.  Since
      PSR_PRESERVED_BITS==PSR.{UP,MFL,MFH,PK,DT,PP,SP,RT,IC}, we
      ended up clearing PSR.{BE,AC,I,DFL,DFH,DI,DB,SI,TB}.  However,
      
       PSR.BE : already is turned off in __kernel_syscall_via_epc()
       PSR.AC : don't care (kernel normally turns PSR.AC on)
       PSR.I  : already turned off by the time fsys_bubble_down gets invoked
       PSR.DFL: always 0 (kernel never turns it on)
       PSR.DFH: don't care --- kernel never touches f32-f127 on its own
      	  initiative
       PSR.DI : always 0 (kernel never turns it on)
       PSR.SI : always 0 (kernel never turns it on)
       PSR.DB : don't care --- kernel never enables kernel-level breakpoints
       PSR.TB : must be 0 already; if it wasn't zero on entry to
      	  __kernel_syscall_via_epc, the branch to fsys_bubble_down
      	  will trigger a taken branch; the taken-trap-handler then
      	  converts the syscall into a break-based system-call.
      
      In other words: all the bits we're clearying are either 0 already or
      are don't cares!  Thus, we don't have to write PSR.L at all and we
      don't have to do a srlz.i either.
      
      Good for another ~20 cycle improvement for EPC-based heavy-weight
      syscalls.
      Signed-off-by: NDavid Mosberger-Tang <davidm@hpl.hp.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      1ba7be7d
  28. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4