1. 14 10月, 2006 1 次提交
  2. 11 10月, 2006 2 次提交
  3. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  4. 04 10月, 2006 1 次提交
  5. 01 10月, 2006 2 次提交
    • A
      [PATCH] maximum latency tracking infrastructure · 5c87579e
      Arjan van de Ven 提交于
      Add infrastructure to track "maximum allowable latency" for power saving
      policies.
      
      The reason for adding this infrastructure is that power management in the
      idle loop needs to make a tradeoff between latency and power savings
      (deeper power save modes have a longer latency to running code again).  The
      code that today makes this tradeoff just does a rather simple algorithm;
      however this is not good enough: There are devices and use cases where a
      lower latency is required than that the higher power saving states provide.
       An example would be audio playback, but another example is the ipw2100
      wireless driver that right now has a very direct and ugly acpi hook to
      disable some higher power states randomly when it gets certain types of
      error.
      
      The proposed solution is to have an interface where drivers can
      
      * announce the maximum latency (in microseconds) that they can deal with
      * modify this latency
      * give up their constraint
      
      and a function where the code that decides on power saving strategy can
      query the current global desired maximum.
      
      This patch has a user of each side: on the consumer side, ACPI is patched
      to use this, on the producer side the ipw2100 driver is patched.
      
      A generic maximum latency is also registered of 2 timer ticks (more and you
      lose accurate time tracking after all).
      
      While the existing users of the patch are x86 specific, the infrastructure
      is not.  I'd like to ask the arch maintainers of other architectures if the
      infrastructure is generic enough for their use (assuming the architecture
      has such a tradeoff as concept at all), and the sound/multimedia driver
      owners to look at the driver facing API to see if this is something they
      can use.
      
      [akpm@osdl.org: cleanups]
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NJesse Barnes <jesse.barnes@intel.com>
      Cc: "Brown, Len" <len.brown@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5c87579e
    • K
      [PATCH] hot-add-mem x86_64: memory_add_physaddr_to_nid node fixup · 8c2676a5
      Keith Mannthey 提交于
      In cases where the acpi memory-add event does not containe the pxm (node)
      infomation allow the driver to look up node info based on the address.  The
      acpi_get_node call returns -1 if it can't decode the pxm info, this causes
      add_memory to panic.  acpi_get_node would have to decode the resource from the
      handle (a lenghty proposition).  This seems to be the cleanist point to
      interject the hook.
      
      [kamezawa.hiroyu@jp.fujitsu.com: build fixes]
      [y-goto@jp.fujitsu.com: build fixes]
      Signed-off-by: NKeith Mannthey <kmannth@us.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Andi Kleen <ak@muc.de>
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NYasunori Goto <y-goto@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8c2676a5
  6. 27 9月, 2006 2 次提交
  7. 17 8月, 2006 2 次提交
  8. 16 8月, 2006 5 次提交
  9. 12 8月, 2006 1 次提交
  10. 06 8月, 2006 2 次提交
  11. 04 8月, 2006 1 次提交
  12. 26 7月, 2006 1 次提交
  13. 13 7月, 2006 2 次提交
  14. 12 7月, 2006 1 次提交
  15. 11 7月, 2006 3 次提交
  16. 10 7月, 2006 9 次提交
    • L
      ACPI: acpi_os_allocate() fixes · e21c1ca3
      Len Brown 提交于
      Replace acpi_in_resume with a more general hack
      to check irqs_disabled() on any kmalloc() from ACPI.
      While setting (system_state != SYSTEM_RUNNING) on resume
      seemed more general, Andrew Morton preferred this approach.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=3469
      
      Make acpi_os_allocate() into an inline function to
      allow /proc/slab_allocators to work.
      
      Delete some memset() that could fault on allocation failure.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e21c1ca3
    • A
      ACPI: SBS: fix initialization, sem2mutex · 8970bfe7
      Andrew Morton 提交于
      cm_sbs_sem is being downed (via acpi_ac_init->acpi_lock_ac_dir) before it is
      initialised, with grave results.
      
      - Make it a mutex
      
      - Initialise it
      
      - Make it static
      
      - Clean other stuff up.
      
      Thanks to Paul Drynoff <pauldrynoff@gmail.com> for reporting and testing.
      
      Cc: Rich Townsend <rhdt@bartol.udel.edu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      8970bfe7
    • A
      d7508032
    • A
      ACPI: delete some defaults from ACPI Kconfig · e26a2b8f
      Andi Kleen 提交于
      No need for video to be always in
      No need for ACPI dock driver to be always in
      No need for smart battery driver to be always in
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e26a2b8f
    • L
    • L
      ACPI: ACPI_DOCK Kconfig · 8d7bff6c
      Len Brown 提交于
      HOTPLUG_PCI_ACPI depends on ACPI_DOCK
      ACPI_IBM_DOCK depends on ACPI_DOCK=n
      ACPI_DOCK is EXPERIMENTAL, though that doesn't seem to mean much
      Signed-off-by: NLen Brown <len.brown@intel.com>
      8d7bff6c
    • L
      Revert "Revert "ACPI: dock driver"" · c8f7a62c
      Len Brown 提交于
      This reverts 953969dd commit.
      c8f7a62c
    • L
      ACPI: acpi_os_get_thread_id() returns current · ab8aa06a
      Len Brown 提交于
      Linux mutexes and the debug code that that reference
      acpi_os_get_thread_id() are happy with 0.
      But the AML mutexes in exmutex.c expect a unique non-zero
      number for each thread - as they track this thread_id
      to permit the mutex re-entrancy defined by the ACPI spec.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=6687Signed-off-by: NLen Brown <len.brown@intel.com>
      ab8aa06a
    • B
      ACPI: ACPICA 20060707 · f6dd9221
      Bob Moore 提交于
      Added the ACPI_PACKED_POINTERS_NOT_SUPPORTED macro to
      support C compilers that do not allow the initialization
      of address pointers within packed structures - even though
      the hardware itself may support misaligned transfers. Some
      of the debug data structures are packed by default to
      minimize size.
      
      Added an error message for the case where
      acpi_os_get_thread_id() returns zero. A non-zero value is
      required by the core ACPICA code to ensure the proper
      operation of AML mutexes and recursive control methods.
      
      The DSDT is now the only ACPI table that determines whether
      the AML interpreter is in 32-bit or 64-bit mode. Not really
      a functional change, but the hooks for per-table 32/64
      switching have been removed from the code. A clarification
      to the ACPI specification is forthcoming in ACPI 3.0B.
      
      Fixed a possible leak of an Owner ID in the error
      path of tbinstal.c acpi_tb_init_table_descriptor() and
      migrated all table OwnerID deletion to a single place in
      acpi_tb_uninstall_table() to correct possible leaks when using
      the acpi_tb_delete_tables_by_type() interface (with assistance
      from Lance Ortiz.)
      
      Fixed a problem with Serialized control methods where the
      semaphore associated with the method could be over-signaled
      after multiple method invocations.
      
      Fixed two issues with the locking of the internal
      namespace data structure. Both the Unload() operator and
      acpi_unload_table() interface now lock the namespace during
      the namespace deletion associated with the table unload
      (with assistance from Linn Crosetto.)
      
      Fixed problem reports (Valery Podrezov) integrated: -
      Eliminate unnecessary memory allocation for CreateXxxxField
      http://bugzilla.kernel.org/show_bug.cgi?id=5426
      
      Fixed problem reports (Fiodor Suietov) integrated: -
      Incomplete cleanup branches in AcpiTbGetTableRsdt (BZ 369)
      - On Address Space handler deletion, needless deactivation
      call (BZ 374) - AcpiRemoveAddressSpaceHandler: validate
      Device handle parameter (BZ 375) - Possible memory leak,
      Notify sub-objects of Processor, Power, ThermalZone (BZ
      376) - AcpiRemoveAddressSpaceHandler: validate Handler
      parameter (BZ 378) - Minimum Length of RSDT should be
      validated (BZ 379) - AcpiRemoveNotifyHandler: return
      AE_NOT_EXIST if Processor Obj has no Handler (BZ (380)
      - AcpiUnloadTable: return AE_NOT_EXIST if no table of
      specified type loaded (BZ 381)
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      f6dd9221
  17. 09 7月, 2006 1 次提交
  18. 03 7月, 2006 1 次提交
  19. 02 7月, 2006 2 次提交