08 Nov, 2005

5 commits


07 Nov, 2005

2 commits

  • This is the remaining misc drivers/ part of the big kfree cleanup patch.

    Remove pointless checks for NULL prior to calling kfree() in misc files in
    drivers/.

    Signed-off-by: Jesper Juhl
    Acked-by: Aristeu Sergio Rozanski Filho
    Acked-by: Roland Dreier
    Acked-by: Pierre Ossman
    Acked-by: Jean Delvare
    Acked-by: Greg Kroah-Hartman
    Acked-by: Len Brown
    Acked-by: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Use schedule_timeout_interruptible() instead of
    set_current_state()/schedule_timeout() to reduce kernel size.

    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nishanth Aravamudan
     

02 Nov, 2005

2 commits


31 Oct, 2005

3 commits

  • The problem is that adbhid[]->input is NULL, so the kernel oopses with
    a null pointer dereference as soon as a key is pressed.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Dmitry Torokhov

    Paul Mackerras
     
  • Paul Mackerras
     
  • I recently picked up my older work to remove unnecessary #includes of
    sched.h, starting from a patch by Dave Jones to not include sched.h
    from module.h. This reduces the number of indirect includes of sched.h
    by ~300. Another ~400 pointless direct includes can be removed after
    this disentangling (patch to follow later).
    However, quite a few indirect includes need to be fixed up for this.

    In order to feed the patches through -mm with as little disturbance as
    possible, I've split out the fixes I accumulated up to now (complete for
    i386 and x86_64, more archs to follow later) and post them before the real
    patch. This way this large part of the patch is kept simple with only
    adding #includes, and all hunks are independent of each other. So if any
    hunk rejects or gets in the way of other patches, just drop it. My scripts
    will pick it up again in the next round.

    Signed-off-by: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

29 Oct, 2005

4 commits


20 Oct, 2005

1 commit

  • We now use the merged time.c for both 32-bit and 64-bit compilation
    with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32.
    This removes setup_default_decr (folds its function into time_init)
    and moves wakeup_decrementer into time.c. This also makes an
    asm-powerpc/rtc.h.

    Signed-off-by: Paul Mackerras

    Paul Mackerras
     

12 Oct, 2005

1 commit


30 Sep, 2005

1 commit

  • The SMU driver has a small mistake in the locking of the interrupt code,
    if polled access and interrupt access race, interrupt may take a lock
    and return without releasing it. This fixes it. With that patch, the
    driver is rock solid with my experimental thermal control (which bangs
    it pretty hard) racing with real time clock and cpufreq handling.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

27 Sep, 2005

1 commit


26 Sep, 2005

1 commit

  • This creates the directory structure under arch/powerpc and a bunch
    of Kconfig files. It does a first-cut merge of arch/powerpc/mm,
    arch/powerpc/lib and arch/powerpc/platforms/powermac. This is enough
    to build a 32-bit powermac kernel with ARCH=powerpc.

    For now we are getting some unmerged files from arch/ppc/kernel and
    arch/ppc/syslib, or arch/ppc64/kernel. This makes some minor changes
    to files in those directories and files outside arch/powerpc.

    The boot directory is still not merged. That's going to be interesting.

    Signed-off-by: Paul Mackerras

    Paul Mackerras
     

25 Sep, 2005

1 commit


23 Sep, 2005

1 commit

  • The SMU is the "system controller" chip used by Apple recent G5 machines
    including the iMac G5. It drives things like fans, i2c busses, real time
    clock, etc...

    The current kernel contains a very crude driver that doesn't do much more
    than reading the real time clock synchronously. This is a completely
    rewritten driver that provides interrupt based command queuing, a userland
    interface, and an i2c/smbus driver for accessing the devices hanging off
    the SMU i2c busses like temperature sensors. This driver is a basic block
    for upcoming work on thermal control for those machines, among others.

    Signed-off-by: Benjamin Herrenschmidt
    Cc: Jean Delvare
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

19 Sep, 2005

1 commit


05 Sep, 2005

2 commits

  • This adds type-checking to pm_message_t, so that people can't confuse it
    with int or u32. It also allows us to fix "disk yoyo" during suspend (disk
    spinning down/up/down).

    [We've tried that before; since that cpufreq problems were fixed and I've
    tried make allyes config and fixed resulting damage.]

    Signed-off-by: Pavel Machek
    Signed-off-by: Alexander Nyberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • Fix remaining bits of u32 vs. pm_message confusion. Should not break
    anything.

    Signed-off-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     

24 Aug, 2005

1 commit


28 Jul, 2005

1 commit

  • This bites me all day when I use our default config for ppc64. We use a
    patch to fix the compile errors and provide the CONFIG_MAC_EMUMOUSEBTN
    functionality (which is behind CONFIG_INPUT_ADBHID). But Benh doesnt like
    it.

    http://ozlabs.org/pipermail/linuxppc64-dev/2005-March/003423.html

    Just hide all the ADB parts from via-pmu on ppc64 instead.

    drivers/macintosh/adbhid.c: In function `adbhid_init':
    drivers/macintosh/adbhid.c:1199: error: `_MACH_chrp' undeclared (first use in this function)
    drivers/macintosh/adbhid.c:1199: error: (Each undeclared identifier is reported only once
    drivers/macintosh/adbhid.c:1199: error: for each function it appears in.)

    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     

07 Jul, 2005

3 commits

  • This adds the hotplug routine for generating hotplug events when devices
    are seen on the macio bus. It uses the attributed created by the sysfs
    nodes to generate the hotplug environment vars for userspace.

    Since the characters allowed inside the 'compatible' field are NUL
    terminated, they are exported as individual OF_COMPATIBLE_# variables,
    with OF_COMPATIBLE_N maintaining a count of how many there are.

    In order for hotplug to work with macio devices, patches to
    module-init-tools and hotplug must be applied. Those patches are
    available at:

    ftp://ftp.suse.com/pub/people/jeffm/linux/macio-hotplug/

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This adds sysfs nodes that the hotplug userspace can use to load the
    appropriate modules.

    In order for hotplug to work with macio devices, patches to
    module-init-tools and hotplug must be applied. Those patches are
    available at:

    ftp://ftp.suse.com/pub/people/jeffm/linux/macio-hotplug/

    Changes: The previous versions were built on 2.6.12. 2.6.13-rcX introduced
    a device_attribute parameter to the show functions. Since that
    parameter was treated as the output buffer, memory corruption would
    result, causing Oopsen very quickly.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This converts the usage of struct of_match to struct of_device_id,
    similar to pci_device_id. This allows a device table to be generated,
    which can be parsed by depmod(8) to generate a map file for module
    loading.

    In order for hotplug to work with macio devices, patches to
    module-init-tools and hotplug must be applied. Those patches are
    available at:

    ftp://ftp.suse.com/pub/people/jeffm/linux/macio-hotplug/

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     

28 Jun, 2005

3 commits

  • This patch removes CONFIG_PMAC_PBOOK (PowerBook support). This is now
    split into CONFIG_PMAC_MEDIABAY for the actual hotswap bay that some
    powerbooks have, CONFIG_PM for power management related code, and just left
    out of any CONFIG_* option for some generally useful stuff that can be used
    on non-laptops as well.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • The macserial driver has been obsoleted by the new pmac_zilog driver for a
    while now and probably doesn't even work anymore on recent kernels. This
    patch removes it.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • The Power Management Unit on PowerMacs is very sensitive to timeouts during
    async message exchanges. It uses rather crude protocol based on a shift
    register with an interrupt and is almost continuously exchanging messages with
    the host CPU on laptops.

    This patch adds a routine to the open_pic driver to be able to select a PMU
    driver so that it bumps it's interrupt priority to above the normal level.

    This will allow PMU interrupts to occur while another interrupt is pending,
    and thus reduce the risk of machine beeing abruptly shutdown by the PMU due to
    a timeout in PMU communication caused by excessive interrupt latency. The
    problem is very rare, and usually just doesn't happen, but it is still useful
    to make things even more robust.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

26 Jun, 2005

1 commit

  • 1. Establish a simple API for process freezing defined in linux/include/sched.h:

    frozen(process) Check for frozen process
    freezing(process) Check if a process is being frozen
    freeze(process) Tell a process to freeze (go to refrigerator)
    thaw_process(process) Restart process
    frozen_process(process) Process is frozen now

    2. Remove all references to PF_FREEZE and PF_FROZEN from all
    kernel sources except sched.h

    3. Fix numerous locations where try_to_freeze is manually done by a driver

    4. Remove the argument that is no longer necessary from two function calls.

    5. Some whitespace cleanup

    6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
    cleared before setting PF_FROZEN, recalc_sigpending does not check
    PF_FROZEN).

    This patch does not address the problem of freeze_processes() violating the rule
    that a task may only modify its own flags by setting PF_FREEZE. This is not clean
    in an SMP environment. freeze(process) is therefore not SMP safe!

    Signed-off-by: Christoph Lameter
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

22 Jun, 2005

1 commit

  • Some months ago, you killed the address ranges mechanism from all
    sensors i2c chip drivers (both the module parameters and the in-code
    address lists). I think it was a very good move, as the ranges can
    easily be replaced by individual addresses, and this allowed for
    significant cleanups in the i2c core (let alone the impressive size
    shrink for all these drivers).

    Unfortunately you did not do the same for non-sensors i2c chip drivers.
    These need the address ranges even less, so we could get rid of the
    ranges here as well for another significant i2c core cleanup. Here comes
    a patch which does just that. Since the process is exactly the same as
    what you did for the other drivers set already, I did not split this one
    in parts.

    A documentation update is included.

    The change saves 308 bytes in the i2c core, and an average 1382 bytes
    for chip drivers which use I2C_CLIENT_INSMOD, 126 bytes for those which
    do not.

    This change is required if we want to merge the sensors and non-sensors
    i2c code (and we want to do this).

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Index: gregkh-2.6/Documentation/i2c/writing-clients
    ===================================================================

    Jean Delvare
     

21 Jun, 2005

2 commits


10 Jun, 2005

1 commit

  • Despite all the care lately in making the powermac sleep/wakeup as
    robust as possible, there is still a nasty related to the use of cpufreq
    on PMU based machines. Unfortunately, it affects paulus old powerbook
    so I have to fix it :)

    We didn't manage to understand what is precisely going on, it leads to
    memory corruption and might have to do with RAM not beeing properly
    refreshed when a cpufreq transition is done right before the sleep.

    The best workaround (and less intrusive at this point) we could come up
    with is included in this patch. We basically do _not_ force a switch to
    high speed on suspend anymore (that is what is causing the problem) on
    those machines. We still force a speed switch on wakeup (since we don't
    know what speed we are coming back from sleep at, and that seems to work
    fine).

    Since, during this short interval, the actual CPU speed might be
    incorrect, we also hack around by multiplying loops_per_jiffy by 2 (max
    speed factor on those machines) during early wakeup stage to make sure
    udelay's during that time aren't too short.

    For after 2.6.12, we'll change udelay implementation to use the CPU
    timebase (which is always constant) instead like we do on ppc64 and thus
    get rid of all those problems.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

29 May, 2005

1 commit

  • Recent kernels occasionally trigger a PMU timeout on some mac laptops,
    typically on wakeup from sleep. This seem to be caused by either a too big
    latency caused by the cpufreq switch on wakeup from sleep or by an
    interrupt beeing lost due to the reset of the interrupt controller done
    during wakeup.

    This patch makes that code more robust by stopping PMU auto poll activity
    around cpufreq changes on machines that use the PMU for such changes (long
    latency switching involving a CPU hard reset and flush of all caches) and
    by removing the reset of the open pic interrupt controller on wakeup (that
    can cause the loss of an interrupt and Darwin doesn't do it, so it must not
    be necessary).

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt