1. 26 3月, 2007 1 次提交
  2. 08 3月, 2007 2 次提交
  3. 20 2月, 2007 2 次提交
    • R
      backlight: Separate backlight properties from backlight ops pointers · 599a52d1
      Richard Purdie 提交于
      Per device data such as brightness belongs to the indivdual device
      and should therefore be separate from the the backlight operation
      function pointers. This patch splits the two types of data and
      allows simplifcation of some code.
      Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
      599a52d1
    • R
      backlight: Fix external uses of backlight internal semaphore · 28ee086d
      Richard Purdie 提交于
      backlight_device->sem has a very specific use as documented in the
      header file. The external users of this are using it for a different
      reason, to serialise access to the update_status() method.
      
      backlight users were supposed to implement their own internal
      serialisation of update_status() if needed but everyone is doing
      things differently and incorrectly. Therefore add a global mutex to
      take care of serialisation for everyone, once and for all.
      
      Locking for get_brightness remains optional since most users don't
      need it.
      
      Also update the lcd class in a similar way.
      Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
      28ee086d
  4. 17 2月, 2007 1 次提交
  5. 13 2月, 2007 1 次提交
  6. 07 2月, 2007 1 次提交
  7. 06 12月, 2006 1 次提交
  8. 04 12月, 2006 3 次提交
    • B
      [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h · 68a64357
      Benjamin Herrenschmidt 提交于
      powerpc: Merge 32 and 64 bits asm-powerpc/io.h
      
      The rework on io.h done for the new hookable accessors made it easier,
      so I just finished the work and merged 32 and 64 bits io.h for arch/powerpc.
      
      arch/ppc still uses the old version in asm-ppc, there is just too much gunk
      in there that I really can't be bothered trying to cleanup.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      68a64357
    • B
      [POWERPC] Souped-up of_platform_device support · 7eebde70
      Benjamin Herrenschmidt 提交于
      This patch first splits of_device.c and of_platform.c, the later containing
      the bits relative to of_platform_device's. On the "breaks" side of things,
      drivers uisng of_platform_device(s) need to include asm/of_platform.h now
      and of_(un)register_driver is now of_(un)register_platform_driver.
      
      In addition to a few utility functions to locate of_platform_device(s),
      the main new addition is of_platform_bus_probe() which allows the platform
      code to trigger an automatic creation of of_platform_devices for a whole
      tree of devices.
      
      The function acts based on the type of the various "parent" devices encountered
      from a provided root, using either a default known list of bus types that can be
      "probed" or a passed-in list. It will only register devices on busses matching
      that list, which mean that typically, it will not register PCI devices, as
      expected (since they will be picked up by the PCI layer).
      
      This will be used by Cell platforms using 4xx-type IOs in the Axon bridge
      and can be used by any embedded-type device as well.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7eebde70
    • 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
  9. 02 12月, 2006 1 次提交
  10. 13 11月, 2006 2 次提交
  11. 23 10月, 2006 1 次提交
  12. 10 10月, 2006 1 次提交
    • P
      [POWERPC] Fix secondary CPU startup on old "powersurge" SMP powermacs · d6a29252
      Paul Mackerras 提交于
      On the old "powersurge" SMP powermacs, the second CPU is started up
      by sending it an IPI, which has the side effect of stopping the
      timebase clock (so the secondary CPU's timebase can be synchronized
      with the primary's).  The routine that did this used udelay, which
      will hang forever when the timebase is stopped, since udelay now spins
      until the timebase reaches a certain value.
      
      The end result is that the kernel would hang when bringing up the
      second CPU.  This fixes it by using a simple loop which just does a
      fixed number of iterations to generate the delay.  These old systems
      were all clocked at around 200 MHz or so, so a fixed number of
      iterations is acceptable.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d6a29252
  13. 07 10月, 2006 1 次提交
  14. 06 10月, 2006 1 次提交
  15. 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
  16. 04 10月, 2006 1 次提交
  17. 01 10月, 2006 1 次提交
  18. 24 9月, 2006 1 次提交
  19. 20 9月, 2006 1 次提交
  20. 04 9月, 2006 1 次提交
  21. 02 9月, 2006 1 次提交
  22. 23 8月, 2006 1 次提交
  23. 01 8月, 2006 1 次提交
  24. 31 7月, 2006 1 次提交
  25. 28 7月, 2006 1 次提交
  26. 25 7月, 2006 1 次提交
  27. 11 7月, 2006 2 次提交
    • M
      [PATCH] powermac: Combined fixes for backlight code · e01af038
      Michael Hanselmann 提交于
      This patch fixes several problems:
      - pmac_backlight_key() is called under interrupt context, and therefore
        can't use mutexes or semaphores, so defer the backlight level for
        later, as it's not critical (original code by Aristeu S. Rozanski F.
        <aris@valeta.org>).
      - Add exports for functions that might be called from modules
      - Fix Kconfig depdencies on PMAC_BACKLIGHT.
      - Fix locking issues on calls from inside the driver (reported by
        Aristeu S. Rozanski F., too)
      - Fix wrong calculation of backlight values in some of the drivers
      - Replace pmac_backlight_key_up/down by inline functions
      
      [akpm@osdl.org: fix function prototypes]
      Signed-off-by: NMichael Hanselmann <linux-kernel@hansmi.ch>
      Acked-by: NAristeu S. Rozanski F. <aris@valeta.org>
      Acked-by: NRene Nussbaumer <linux-kernel@killerfox.forkbomb.ch>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e01af038
    • B
      [PATCH] powerpc: fix trigger handling in the new irq code · 6e99e458
      Benjamin Herrenschmidt 提交于
      This patch slightly reworks the new irq code to fix a small design error.  I
      removed the passing of the trigger to the map() calls entirely, it was not a
      good idea to have one call do two different things.  It also fixes a couple of
      corner cases.
      
      Mapping a linux virtual irq to a physical irq now does only that.  Setting the
      trigger is a different action which has a different call.
      
      The main changes are:
      
      - I no longer call host->ops->map() for an already mapped irq, I just return
        the virtual number that was already mapped.  It was called before to give an
        opportunity to change the trigger, but that was causing issues as that could
        happen while the interrupt was in use by a device, and because of the
        trigger change, map would potentially muck around with things in a racy way.
         That was causing much burden on a given's controller implementation of
        map() to get it right.  This is much simpler now.  map() is only called on
        the initial mapping of an irq, meaning that you know that this irq is _not_
        being used.  You can initialize the hardware if you want (though you don't
        have to).
      
      - Controllers that can handle different type of triggers (level/edge/etc...)
        now implement the standard irq_chip->set_type() call as defined by the
        generic code.  That means that you can use the standard set_irq_type() to
        configure an irq line manually if you wish or (though I don't like that
        interface), pass explicit trigger flags to request_irq() as defined by the
        generic kernel interfaces.  Also, using those interfaces guarantees that
        your controller set_type callback is called with the descriptor lock held,
        thus providing locking against activity on the same interrupt (including
        mask/unmask/etc...) automatically.  A result is that, for example, MPIC's
        own map() implementation calls irq_set_type(NONE) to configure the hardware
        to the default triggers.
      
      - To allow the above, the irq_map array entry for the new mapped interrupt
        is now set before map() callback is called for the controller.
      
      - The irq_create_of_mapping() (also used by irq_of_parse_and_map()) function
        for mapping interrupts from the device-tree now also call the separate
        set_irq_type(), and only does so if there is a change in the trigger type.
      
      - While I was at it, I changed pci_read_irq_line() (which is the helper I
        would expect most archs to use in their pcibios_fixup() to get the PCI
        interrupt routing from the device tree) to also handle a fallback when the
        DT mapping fails consisting of reading the PCI_INTERRUPT_PIN to know wether
        the device has an interrupt at all, and the the PCI_INTERRUPT_LINE to get an
        interrupt number from the device.  That number is then mapped using the
        default controller, and the trigger is set to level low.  That default
        behaviour works for several platforms that don't have a proper interrupt
        tree like Pegasos.  If it doesn't work for your platform, then either
        provide a proper interrupt tree from the firmware so that fallback isn't
        needed, or don't call pci_read_irq_line()
      
      - Add back a bit that got dropped by my main rework patch for properly
        clearing pending IPIs on pSeries when using a kexec
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6e99e458
  28. 07 7月, 2006 2 次提交
  29. 04 7月, 2006 1 次提交
    • S
      kbuild: introduce utsrelease.h · 63104eec
      Sam Ravnborg 提交于
      include/linux/version.h contained both actual KERNEL version
      and UTS_RELEASE that contains a subset from git SHA1 for when
      kernel was compiled as part of a git repository.
      This had the unfortunate side-effect that all files including version.h
      would be recompiled when some git changes was made due to changes SHA1.
      Split it out so we keep independent parts in separate files.
      
      Also update checkversion.pl script to no longer check for UTS_RELEASE.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      63104eec
  30. 03 7月, 2006 4 次提交