1. 07 10月, 2006 2 次提交
  2. 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
  3. 01 10月, 2006 1 次提交
    • T
      [PATCH] maximum latency tracking: ALSA support · 9442e691
      Takashi Iwai 提交于
      Add maximum latency tracking to the ALSA subsystem for PCM playback.  In
      ALSA, the playback application controls the buffer size and thus indirectly
      the period of latency that it can deal with.  This patch uses 75% of the
      total available latency as threshold to announce to the latency subsystem;
      While 75% is a crude heuristic it's a quite reasonable one; the remaining
      25% can be used for all driver processing for the next samples which is
      also proportional to the size of the buffer.
      
      With ogg123 a latency setting of about 4msec was seen (at 44Khz), while
      with the "play" command a much longer maximum tolerable latency was seen.
      Other, more multimedia oriented players as well as games, will have a lot
      smaller buffers to allow better synchronization and those will actually get
      into the latency domains where there is impact on the power management
      rules.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9442e691
  4. 23 9月, 2006 17 次提交
  5. 19 9月, 2006 1 次提交
  6. 13 7月, 2006 2 次提交
  7. 03 7月, 2006 1 次提交
  8. 29 6月, 2006 4 次提交
  9. 25 6月, 2006 1 次提交
    • A
      V4L/DVB (4210b): git-dvb: tea575x-tuner build fix · 7477ddaa
      Andrew Morton 提交于
      In file included from sound/i2c/other/tea575x-tuner.c:30:
      include/sound/tea575x-tuner.h:36: error: field 'vd' has incomplete type
      include/sound/tea575x-tuner.h:37: error: field 'fops' has incomplete type
      sound/i2c/other/tea575x-tuner.c:89: warning: 'struct inode' declared inside parameter list
      sound/i2c/other/tea575x-tuner.c:89: warning: its scope is only this definition or declaration, which is probably not what you want
      sound/i2c/other/tea575x-tuner.c: In function 'snd_tea575x_ioctl':
      sound/i2c/other/tea575x-tuner.c:91: warning: implicit declaration of function 'video_devdata'
      sound/i2c/other/tea575x-tuner.c:91: warning: initialization makes pointer from integer without a cast
      sound/i2c/other/tea575x-tuner.c:92: warning: implicit declaration of function 'video_get_drvdata'
      sound/i2c/other/tea575x-tuner.c:92: warning: initialization makes pointer from integer without a cast
      sound/i2c/other/tea575x-tuner.c:96: warning: implicit declaration of function '_IOR'
      sound/i2c/other/tea575x-tuner.c:96: error: syntax error before 'struct'
      sound/i2c/other/tea575x-tuner.c:99: error: 'v' undeclared (first use in this function)
      sound/i2c/other/tea575x-tuner.c:99: error: (Each undeclared identifier is reported only once
      sound/i2c/other/tea575x-tuner.c:99: error: for each function it appears in.)
      sound/i2c/other/tea575x-tuner.c:108: warning: implicit declaration of function 'copy_to_user'
      sound/i2c/other/tea575x-tuner.c:112: warning: implicit declaration of function '_IOWR'
      sound/i2c/other/tea575x-tuner.c:112: error: syntax error before 'struct'
      sound/i2c/other/tea575x-tuner.c:115: warning: implicit declaration of function 'copy_from_user'
      sound/i2c/other/tea575x-tuner.c: At top level:
      sound/i2c/other/tea575x-tuner.c:129: error: syntax error before 'case'
      sound/i2c/other/tea575x-tuner.c:146: warning: type defaults to 'int' in declaration of 'snd_tea575x_set_freq'
      sound/i2c/other/tea575x-tuner.c:146: warning: parameter names (without types) in function declaration
      sound/i2c/other/tea575x-tuner.c:146: error: conflicting types for 'snd_tea575x_set_freq'
      sound/i2c/other/tea575x-tuner.c:62: error: previous definition of 'snd_tea575x_set_freq' was here
      sound/i2c/other/tea575x-tuner.c:146: warning: data definition has no type or storage class
      sound/i2c/other/tea575x-tuner.c:147: error: syntax error before 'return'
      sound/i2c/other/tea575x-tuner.c:151: error: syntax error before '&' token
      sound/i2c/other/tea575x-tuner.c:152: error: syntax error before '.' token
      sound/i2c/other/tea575x-tuner.c:152: warning: type defaults to 'int' in declaration of 'strcpy'
      sound/i2c/other/tea575x-tuner.c:152: warning: function declaration isn't a prototype
      sound/i2c/other/tea575x-tuner.c:152: error: conflicting types for 'strcpy'
      sound/i2c/other/tea575x-tuner.c:152: warning: data definition has no type or storage class
      sound/i2c/other/tea575x-tuner.c: In function 'snd_tea575x_init':
      sound/i2c/other/tea575x-tuner.c:194: warning: implicit declaration of function 'video_set_drvdata'
      sound/i2c/other/tea575x-tuner.c:197: error: 'video_exclusive_open' undeclared (first use in this function)
      sound/i2c/other/tea575x-tuner.c:198: error: 'video_exclusive_release' undeclared (first use in this function)
      sound/i2c/other/tea575x-tuner.c:200: warning: implicit declaration of function 'video_register_device'
      sound/i2c/other/tea575x-tuner.c:200: error: 'VFL_TYPE_RADIO' undeclared (first use in this function)
      sound/i2c/other/tea575x-tuner.c: In function 'snd_tea575x_exit':
      sound/i2c/other/tea575x-tuner.c:215: warning: implicit declaration of function 'video_unregister_device'
      distcc[7333] ERROR: compile sound/i2c/other/tea575x-tuner.c on x/32 failed
      make[1]: *** [sound/i2c/other/tea575x-tuner.o] Error 1
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      7477ddaa
  10. 23 6月, 2006 10 次提交