1. 14 7月, 2016 1 次提交
    • P
      x86/kernel: Audit and remove any unnecessary uses of module.h · 186f4360
      Paul Gortmaker 提交于
      Historically a lot of these existed because we did not have
      a distinction between what was modular code and what was providing
      support to modules via EXPORT_SYMBOL and friends.  That changed
      when we forked out support for the latter into the export.h file.
      
      This means we should be able to reduce the usage of module.h
      in code that is obj-y Makefile or bool Kconfig.  The advantage
      in doing so is that module.h itself sources about 15 other headers;
      adding significantly to what we feed cpp, and it can obscure what
      headers we are effectively using.
      
      Since module.h was the source for init.h (for __init) and for
      export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance
      for the presence of either and replace as needed.  Build testing
      revealed some implicit header usage that was fixed up accordingly.
      
      Note that some bool/obj-y instances remain since module.h is
      the header for some exception table entry stuff, and for things
      like __init_or_module (code that is tossed when MODULES=n).
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20160714001901.31603-4-paul.gortmaker@windriver.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      186f4360
  2. 20 2月, 2014 1 次提交
    • L
      ACPI idle: permit sparse C-state sub-state numbers · 2194324d
      Len Brown 提交于
      Linux uses CPUID.MWAIT.EDX to validate the C-states
      reported by ACPI, silently discarding states which
      are not supported by the HW.
      
      This test is too restrictive, as some HW now uses
      sparse sub-state numbering, so the sub-state number
      may be higher than the number of sub-states...
      
      Also, rather than silently ignoring an invalid state,
      we should complain about a firmware bug.
      
      In practice...
      
      Bay Trail systems originally supported C6-no-shrink as
      MWAIT sub-state 0x58, and in CPUID.MWAIT.EDX 0x03000000
      indicated that there were 3 MWAIT-C6 sub-states.
      So acpi_idle would discard that C-state because 8 >= 3.
      
      Upon discovering this issue, the ucode was updated so that
      C6-no-shrink was also exported as 0x51, and the BIOS was
      updated to match.  However, systems shipped with 0x58,
      will never get a BIOS update, and this patch allows
      Linux to see C6-no-shrink on early Bay Trail.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2194324d
  3. 20 12月, 2013 1 次提交
  4. 29 3月, 2012 1 次提交
  5. 04 8月, 2011 1 次提交
  6. 29 9月, 2010 1 次提交
  7. 18 9月, 2010 1 次提交
  8. 23 7月, 2010 1 次提交
  9. 15 12月, 2009 1 次提交
  10. 27 9月, 2009 1 次提交
  11. 28 5月, 2009 1 次提交
  12. 09 1月, 2009 1 次提交
  13. 06 1月, 2009 1 次提交
  14. 26 7月, 2008 1 次提交
  15. 19 7月, 2008 1 次提交
    • M
      cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr · 65c01184
      Mike Travis 提交于
        * This patch replaces the dangerous lvalue version of cpumask_of_cpu
          with new cpumask_of_cpu_ptr macros.  These are patterned after the
          node_to_cpumask_ptr macros.
      
          In general terms, if there is a cpumask_of_cpu_map[] then a pointer to
          the cpumask_of_cpu_map[cpu] entry is used.  The cpumask_of_cpu_map
          is provided when there is a large NR_CPUS count, reducing
          greatly the amount of code generated and stack space used for
          cpumask_of_cpu().  The pointer to the cpumask_t value is needed for
          calling set_cpus_allowed_ptr() to reduce the amount of stack space
          needed to pass the cpumask_t value.
      
          If there isn't a cpumask_of_cpu_map[], then a temporary variable is
          declared and filled in with value from cpumask_of_cpu(cpu) as well as
          a pointer variable pointing to this temporary variable.  Afterwards,
          the pointer is used to reference the cpumask value.  The compiler
          will optimize out the extra dereference through the pointer as well
          as the stack space used for the pointer, resulting in identical code.
      
          A good example of the orthogonal usages is in net/sunrpc/svc.c:
      
      	case SVC_POOL_PERCPU:
      	{
      		unsigned int cpu = m->pool_to[pidx];
      		cpumask_of_cpu_ptr(cpumask, cpu);
      
      		*oldmask = current->cpus_allowed;
      		set_cpus_allowed_ptr(current, cpumask);
      		return 1;
      	}
      	case SVC_POOL_PERNODE:
      	{
      		unsigned int node = m->pool_to[pidx];
      		node_to_cpumask_ptr(nodecpumask, node);
      
      		*oldmask = current->cpus_allowed;
      		set_cpus_allowed_ptr(current, nodecpumask);
      		return 1;
      	}
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      65c01184
  16. 20 4月, 2008 2 次提交
  17. 14 2月, 2008 1 次提交
  18. 20 10月, 2007 1 次提交
    • M
      x86: convert cpuinfo_x86 array to a per_cpu array · 92cb7612
      Mike Travis 提交于
      cpu_data is currently an array defined using NR_CPUS.  This means that
      we overallocate since we will rarely really use maximum configured cpus.
      When NR_CPU count is raised to 4096 the size of cpu_data becomes
      3,145,728 bytes.
      
      These changes were adopted from the sparc64 (and ia64) code.  An
      additional field was added to cpuinfo_x86 to be a non-ambiguous cpu
      index.  This corresponds to the index into a cpumask_t as well as the
      per_cpu index.  It's used in various places like show_cpuinfo().
      
      cpu_data is defined to be the boot_cpu_data structure for the NON-SMP
      case.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Acked-by: NChristoph Lameter <clameter@sgi.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: Mark M. Hoffman <mhoffman@lightlink.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      92cb7612
  19. 11 10月, 2007 1 次提交
  20. 11 1月, 2007 1 次提交
  21. 08 12月, 2006 1 次提交
  22. 04 12月, 2006 1 次提交
  23. 14 10月, 2006 1 次提交
  24. 01 12月, 2005 1 次提交
  25. 12 7月, 2005 1 次提交