07 Feb, 2008

6 commits

  • Every file should include the headers containing the prototypes for its global
    functions (in this case {,un}register_reboot_notifier()).

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Make the needlessly global srcu_readers_active() static.

    Signed-off-by: Adrian Bunk
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Every file should include the headers containing the prototypes for its global
    functions (in this case sys_ptrace()).

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • When passing a zero address to kallsyms_lookup(), the kernel thought it was
    a valid kernel address, even if it is not. This is because is_ksym_addr()
    called is_kernel_extratext() and checked against labels that don't exist on
    many archs (which default as zero). Since PPC was the only kernel which
    defines _extra_text, (in 2005), and no longer needs it, this patch removes
    _extra_text support.

    For some history (provided by Jon):
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019734.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019736.html
    http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019751.html

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Robin Getz
    Cc: David Woodhouse
    Cc: Jon Loeliger
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Getz
     
  • 1. It is much easier to grep for ->state change if __set_task_state() is used
    instead of the direct assignment.

    2. ptrace_stop() and handle_group_stop() use set_task_state() which adds the
    unneeded mb() (btw even if we use mb() it is still possible that do_wait()
    sees the new ->state but not ->exit_code, but this is ok).

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • This moves the ability to scale cputime into generic code. This allows us
    to fix the issue in kernel/timer.c (noticed by Balbir) where we could only
    add an unscaled value to the scaled utime/stime.

    This adds a cputime_to_scaled function. As before, the POWERPC version
    does the scaling based on the last SPURR/PURR ratio calculated. The
    generic and s390 (only other arch to implement asm/cputime.h) versions are
    both NOPs.

    Also moves the SPURR and PURR snapshots closer.

    Signed-off-by: Michael Neuling
    Cc: Jay Lan
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Neuling
     

06 Feb, 2008

14 commits

  • Replace latency.c use with pm_qos_params use.

    Signed-off-by: mark gross
    Cc: "John W. Linville"
    Cc: Len Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Gross
     
  • The following patch is a generalization of the latency.c implementation done
    by Arjan last year. It provides infrastructure for more than one parameter,
    and exposes a user mode interface for processes to register pm_qos
    expectations of processes.

    This interface provides a kernel and user mode interface for registering
    performance expectations by drivers, subsystems and user space applications on
    one of the parameters.

    Currently we have {cpu_dma_latency, network_latency, network_throughput} as
    the initial set of pm_qos parameters.

    The infrastructure exposes multiple misc device nodes one per implemented
    parameter. The set of parameters implement is defined by pm_qos_power_init()
    and pm_qos_params.h. This is done because having the available parameters
    being runtime configurable or changeable from a driver was seen as too easy to
    abuse.

    For each parameter a list of performance requirements is maintained along with
    an aggregated target value. The aggregated target value is updated with
    changes to the requirement list or elements of the list. Typically the
    aggregated target value is simply the max or min of the requirement values
    held in the parameter list elements.

    >From kernel mode the use of this interface is simple:

    pm_qos_add_requirement(param_id, name, target_value):

    Will insert a named element in the list for that identified PM_QOS
    parameter with the target value. Upon change to this list the new target is
    recomputed and any registered notifiers are called only if the target value
    is now different.

    pm_qos_update_requirement(param_id, name, new_target_value):

    Will search the list identified by the param_id for the named list element
    and then update its target value, calling the notification tree if the
    aggregated target is changed. with that name is already registered.

    pm_qos_remove_requirement(param_id, name):

    Will search the identified list for the named element and remove it, after
    removal it will update the aggregate target and call the notification tree
    if the target was changed as a result of removing the named requirement.

    >From user mode:

    Only processes can register a pm_qos requirement. To provide for
    automatic cleanup for process the interface requires the process to register
    its parameter requirements in the following way:

    To register the default pm_qos target for the specific parameter, the
    process must open one of /dev/[cpu_dma_latency, network_latency,
    network_throughput]

    As long as the device node is held open that process has a registered
    requirement on the parameter. The name of the requirement is
    "process_" derived from the current->pid from within the open system
    call.

    To change the requested target value the process needs to write a s32
    value to the open device node. This translates to a
    pm_qos_update_requirement call.

    To remove the user mode request for a target value simply close the device
    node.

    [akpm@linux-foundation.org: fix warnings]
    [akpm@linux-foundation.org: fix build]
    [akpm@linux-foundation.org: fix build again]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: mark gross
    Cc: "John W. Linville"
    Cc: Len Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Arjan van de Ven
    Cc: Venki Pallipadi
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Gross
     
  • kernel_shutdown_prepare() can now become static.

    Signed-off-by: Adrian Bunk
    Acked-by: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • resume_file[] and create_image() can become static.

    Signed-off-by: Adrian Bunk
    Acked-by: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • The capability bounding set is a set beyond which capabilities cannot grow.
    Currently cap_bset is per-system. It can be manipulated through sysctl,
    but only init can add capabilities. Root can remove capabilities. By
    default it includes all caps except CAP_SETPCAP.

    This patch makes the bounding set per-process when file capabilities are
    enabled. It is inherited at fork from parent. Noone can add elements,
    CAP_SETPCAP is required to remove them.

    One example use of this is to start a safer container. For instance, until
    device namespaces or per-container device whitelists are introduced, it is
    best to take CAP_MKNOD away from a container.

    The bounding set will not affect pP and pE immediately. It will only
    affect pP' and pE' after subsequent exec()s. It also does not affect pI,
    and exec() does not constrain pI'. So to really start a shell with no way
    of regain CAP_MKNOD, you would do

    prctl(PR_CAPBSET_DROP, CAP_MKNOD);
    cap_t cap = cap_get_proc();
    cap_value_t caparray[1];
    caparray[0] = CAP_MKNOD;
    cap_set_flag(cap, CAP_INHERITABLE, 1, caparray, CAP_DROP);
    cap_set_proc(cap);
    cap_free(cap);

    The following test program will get and set the bounding
    set (but not pI). For instance

    ./bset get
    (lists capabilities in bset)
    ./bset drop cap_net_raw
    (starts shell with new bset)
    (use capset, setuid binary, or binary with
    file capabilities to try to increase caps)

    ************************************************************
    cap_bound.c
    ************************************************************
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    #ifndef PR_CAPBSET_READ
    #define PR_CAPBSET_READ 23
    #endif

    #ifndef PR_CAPBSET_DROP
    #define PR_CAPBSET_DROP 24
    #endif

    int usage(char *me)
    {
    printf("Usage: %s get\n", me);
    printf(" %s drop \n", me);
    return 1;
    }

    #define numcaps 32
    char *captable[numcaps] = {
    "cap_chown",
    "cap_dac_override",
    "cap_dac_read_search",
    "cap_fowner",
    "cap_fsetid",
    "cap_kill",
    "cap_setgid",
    "cap_setuid",
    "cap_setpcap",
    "cap_linux_immutable",
    "cap_net_bind_service",
    "cap_net_broadcast",
    "cap_net_admin",
    "cap_net_raw",
    "cap_ipc_lock",
    "cap_ipc_owner",
    "cap_sys_module",
    "cap_sys_rawio",
    "cap_sys_chroot",
    "cap_sys_ptrace",
    "cap_sys_pacct",
    "cap_sys_admin",
    "cap_sys_boot",
    "cap_sys_nice",
    "cap_sys_resource",
    "cap_sys_time",
    "cap_sys_tty_config",
    "cap_mknod",
    "cap_lease",
    "cap_audit_write",
    "cap_audit_control",
    "cap_setfcap"
    };

    int getbcap(void)
    {
    int comma=0;
    unsigned long i;
    int ret;

    printf("i know of %d capabilities\n", numcaps);
    printf("capability bounding set:");
    for (i=0; i< 0)
    perror("prctl");
    else if (ret==1)
    printf("%s%s", (comma++) ? ", " : " ", captable[i]);
    }
    printf("\n");
    return 0;
    }

    int capdrop(char *str)
    {
    unsigned long i;

    int found=0;
    for (i=0; i
    Signed-off-by: Andrew G. Morgan
    Cc: Stephen Smalley
    Cc: James Morris
    Cc: Chris Wright
    Cc: Casey Schaufler a
    Signed-off-by: "Serge E. Hallyn"
    Tested-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • The patch supports legacy (32-bit) capability userspace, and where possible
    translates 32-bit capabilities to/from userspace and the VFS to 64-bit
    kernel space capabilities. If a capability set cannot be compressed into
    32-bits for consumption by user space, the system call fails, with -ERANGE.

    FWIW libcap-2.00 supports this change (and earlier capability formats)

    http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/

    [akpm@linux-foundation.org: coding-syle fixes]
    [akpm@linux-foundation.org: use get_task_comm()]
    [ezk@cs.sunysb.edu: build fix]
    [akpm@linux-foundation.org: do not initialise statics to 0 or NULL]
    [akpm@linux-foundation.org: unused var]
    [serue@us.ibm.com: export __cap_ symbols]
    Signed-off-by: Andrew G. Morgan
    Cc: Stephen Smalley
    Acked-by: Serge Hallyn
    Cc: Chris Wright
    Cc: James Morris
    Cc: Casey Schaufler
    Signed-off-by: Erez Zadok
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morgan
     
  • Add vm.highmem_is_dirtyable toggle

    A 32 bit machine with HIGHMEM64 enabled running DCC has an MMAPed file of
    approximately 2Gb size which contains a hash format that is written
    randomly by the dbclean process. On 2.6.16 this process took a few
    minutes. With lowmem only accounting of dirty ratios, this takes about 12
    hours of 100% disk IO, all random writes.

    Include a toggle in /proc/sys/vm/highmem_is_dirtyable which can be set to 1 to
    add the highmem back to the total available memory count.

    [akpm@linux-foundation.org: Fix the CONFIG_DETECT_SOFTLOCKUP=y build]
    Signed-off-by: Bron Gondwana
    Cc: Ethan Solomita
    Cc: Peter Zijlstra
    Cc: WU Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bron Gondwana
     
  • (with Martin Schwidefsky )

    The pgd/pud/pmd/pte page table allocation functions get a mm_struct pointer as
    first argument. The free functions do not get the mm_struct argument. This
    is 1) asymmetrical and 2) to do mm related page table allocations the mm
    argument is needed on the free function as well.

    [kamalesh@linux.vnet.ibm.com: i386 fix]
    [akpm@linux-foundation.org: coding-syle fixes]
    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Martin Schwidefsky
    Cc:
    Signed-off-by: Kamalesh Babulal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • - Add comments explaing how drain_pages() works.

    - Eliminate useless functions

    - Rename drain_all_local_pages to drain_all_pages(). It does drain
    all pages not only those of the local processor.

    - Eliminate useless interrupt off / on sequences. drain_pages()
    disables interrupts on its own. The execution thread is
    pinned to processor by the caller. So there is no need to
    disable interrupts.

    - Put drain_all_pages() declaration in gfp.h and remove the
    declarations from suspend.h and from mm/memory_hotplug.c

    - Make software suspend call drain_all_pages(). The draining
    of processor local pages is may not the right approach if
    software suspend wants to support SMP. If they call drain_all_pages
    then we can make drain_pages() static.

    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Christoph Lameter
    Acked-by: Mel Gorman
    Cc: "Rafael J. Wysocki"
    Cc: Daniel Walker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • This is the new timerfd API as it is implemented by the following patch:

    int timerfd_create(int clockid, int flags);
    int timerfd_settime(int ufd, int flags,
    const struct itimerspec *utmr,
    struct itimerspec *otmr);
    int timerfd_gettime(int ufd, struct itimerspec *otmr);

    The timerfd_create() API creates an un-programmed timerfd fd. The "clockid"
    parameter can be either CLOCK_MONOTONIC or CLOCK_REALTIME.

    The timerfd_settime() API give new settings by the timerfd fd, by optionally
    retrieving the previous expiration time (in case the "otmr" parameter is not
    NULL).

    The time value specified in "utmr" is absolute, if the TFD_TIMER_ABSTIME bit
    is set in the "flags" parameter. Otherwise it's a relative time.

    The timerfd_gettime() API returns the next expiration time of the timer, or
    {0, 0} if the timerfd has not been set yet.

    Like the previous timerfd API implementation, read(2) and poll(2) are
    supported (with the same interface). Here's a simple test program I used to
    exercise the new timerfd APIs:

    http://www.xmailserver.org/timerfd-test2.c

    [akpm@linux-foundation.org: coding-style cleanups]
    [akpm@linux-foundation.org: fix ia64 build]
    [akpm@linux-foundation.org: fix m68k build]
    [akpm@linux-foundation.org: fix mips build]
    [akpm@linux-foundation.org: fix alpha, arm, blackfin, cris, m68k, s390, sparc and sparc64 builds]
    [heiko.carstens@de.ibm.com: fix s390]
    [akpm@linux-foundation.org: fix powerpc build]
    [akpm@linux-foundation.org: fix sparc64 more]
    Signed-off-by: Davide Libenzi
    Cc: Michael Kerrisk
    Cc: Thomas Gleixner
    Cc: Davide Libenzi
    Cc: Michael Kerrisk
    Cc: Martin Schwidefsky
    Signed-off-by: Heiko Carstens
    Cc: Michael Kerrisk
    Cc: Davide Libenzi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     
  • As Roland pointed out, we have the very old problem with exec. de_thread()
    sets SIGNAL_GROUP_EXIT, kills other threads, changes ->group_leader and then
    clears signal->flags. All signals (even fatal ones) sent in this window
    (which is not too small) will be lost.

    With this patch exec doesn't abuse SIGNAL_GROUP_EXIT. signal_group_exit(),
    the new helper, should be used to detect exit_group() or exec() in progress.
    It can have more users, but this patch does only strictly necessary changes.

    Signed-off-by: Oleg Nesterov
    Cc: Davide Libenzi
    Cc: Ingo Molnar
    Cc: Robin Holt
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Every time we set SIGNAL_GROUP_EXIT or clear SIGNAL_STOP_DEQUEUED we also
    reset ->group_stop_count.

    This means that the SIGNAL_GROUP_EXIT check in handle_group_stop() is not
    needed, and do_signal_stop() should check SIGNAL_STOP_DEQUEUED only when
    ->group_stop_count == 0. With these changes handle_group_stop() becomes the
    subset of do_signal_stop(), we can kill it and use do_signal_stop() instead.

    Also, a preparation for the next patch.

    Signed-off-by: Oleg Nesterov
    Cc: Davide Libenzi
    Cc: Ingo Molnar
    Cc: Robin Holt
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • When __group_complete_signal() sees sig_kernel_coredump() signal, it starts
    the group stop, but sets ->group_exit_task = t in a hope that "t" will
    actually dequeue this signal and invoke do_coredump(). However, by the
    time "t" enters get_signal_to_deliver() it is possible that the signal was
    blocked/ignored or we have another pending !SIG_KERNEL_COREDUMP_MASK signal
    which will be dequeued first. This means the task could be stopped but not
    killed.

    Remove this code from __group_complete_signal(). Note also this patch
    removes the bogus signal_wake_up(t, 1). This thread can't be
    STOPPED/TRACED, note the corresponding check in wants_signal().

    Signed-off-by: Oleg Nesterov
    Cc: Davide Libenzi
    Cc: Ingo Molnar
    Cc: Robin Holt
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Ulrich says that we never used this clone flags and that nothing should be
    using it.

    As we're down to only a single bit left in clone's flags argument, let's add a
    warning to check that no userspace is actually using it. Hopefully we will
    be able to recycle it.

    Roland said:

    CLONE_STOPPED was previously used by some NTPL versions when under
    thread_db (i.e. only when being actively debugged by gdb), but not for a
    long time now, and it never worked reliably when it was used. Removing it
    seems fine to me.

    [akpm@linux-foundation.org: it looks like CLONE_DETACHED is being used]
    Cc: Ulrich Drepper
    Cc: Ingo Molnar
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

04 Feb, 2008

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (79 commits)
    Jesper Juhl is the new trivial patches maintainer
    Documentation: mention email-clients.txt in SubmittingPatches
    fs/binfmt_elf.c: spello fix
    do_invalidatepage() comment typo fix
    Documentation/filesystems/porting fixes
    typo fixes in net/core/net_namespace.c
    typo fix in net/rfkill/rfkill.c
    typo fixes in net/sctp/sm_statefuns.c
    lib/: Spelling fixes
    kernel/: Spelling fixes
    include/scsi/: Spelling fixes
    include/linux/: Spelling fixes
    include/asm-m68knommu/: Spelling fixes
    include/asm-frv/: Spelling fixes
    fs/: Spelling fixes
    drivers/watchdog/: Spelling fixes
    drivers/video/: Spelling fixes
    drivers/ssb/: Spelling fixes
    drivers/serial/: Spelling fixes
    drivers/scsi/: Spelling fixes
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
    scsi: fix dependency bug in aic7 Makefile
    kbuild: add svn revision information to setlocalversion
    kbuild: do not warn about __*init/__*exit symbols being exported
    Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig
    Add HAVE_KPROBES
    Add HAVE_OPROFILE
    Create arch/Kconfig
    Fix ARM to play nicely with generic Instrumentation menu
    kconfig: ignore select of unknown symbol
    kconfig: mark config as changed when loading an alternate config
    kbuild: Spelling/grammar fixes for config DEBUG_SECTION_MISMATCH
    Remove __INIT_REFOK and __INITDATA_REFOK
    kbuild: print only total number of section mismatces found

    Linus Torvalds
     
  • Drivers that register a ->fault handler, but do not range-check the
    offset argument, must set VM_DONTEXPAND in the vm_flags in order to
    prevent an expanding mremap from overflowing the resource.

    I've audited the tree and attempted to fix these problems (usually by
    adding VM_DONTEXPAND where it is not obvious).

    Signed-off-by: Nick Piggin
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

03 Feb, 2008

7 commits

  • Signed-off-by: Joe Perches
    Signed-off-by: Adrian Bunk

    Joe Perches
     
  • The file exit.c contains one useless extern declaration of sem_exit().
    Moreover, it refers to nothing.

    This trivial patch removes it.

    Signed-off-by: Pierre Peiffer
    Signed-off-by: Adrian Bunk

    Pierre Peiffer
     
  • Move the instrumentation Kconfig to

    arch/Kconfig for architecture dependent options
    - oprofile
    - kprobes

    and

    init/Kconfig for architecture independent options
    - profiling
    - markers

    Remove the "Instrumentation Support" menu. Everything moves to "General setup".
    Delete the kernel/Kconfig.instrumentation file.

    Signed-off-by: Mathieu Desnoyers
    Cc: Linus Torvalds
    Cc:
    Signed-off-by: Sam Ravnborg

    Mathieu Desnoyers
     
  • Linus:

    On the per-architecture side, I do think it would be better to *not* have
    internal architecture knowledge in a generic file, and as such a line like

    depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32

    really shouldn't exist in a file like kernel/Kconfig.instrumentation.

    It would be much better to do

    depends on ARCH_SUPPORTS_KPROBES

    in that generic file, and then architectures that do support it would just
    have a

    bool ARCH_SUPPORTS_KPROBES
    default y

    in *their* architecture files. That would seem to be much more logical,
    and is readable both for arch maintainers *and* for people who have no
    clue - and don't care - about which architecture is supposed to support
    which interface...

    Changelog:

    Actually, I know I gave this as the magic incantation, but now that I see
    it, I realize that I should have told you to just use

    config KPROBES_SUPPORT
    def_bool y

    instead, which is a bit denser.

    We seem to use both kinds of syntax for these things, but this is really
    what "def_bool" is there for...

    - Use HAVE_KPROBES
    - Use a select

    - Yet another update :
    Moving to HAVE_* now.

    - Update ARM for kprobes support.

    Signed-off-by: Mathieu Desnoyers
    Cc: Jeff Dike
    Cc: David Howells
    Cc: Ananth N Mavinakayanahalli
    Signed-off-by: Sam Ravnborg

    Mathieu Desnoyers
     
  • Linus:
    On the per-architecture side, I do think it would be better to *not* have
    internal architecture knowledge in a generic file, and as such a line like

    depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32

    really shouldn't exist in a file like kernel/Kconfig.instrumentation.

    It would be much better to do

    depends on ARCH_SUPPORTS_KPROBES

    in that generic file, and then architectures that do support it would just
    have a

    bool ARCH_SUPPORTS_KPROBES
    default y

    in *their* architecture files. That would seem to be much more logical,
    and is readable both for arch maintainers *and* for people who have no
    clue - and don't care - about which architecture is supposed to support
    which interface...

    Changelog:

    Actually, I know I gave this as the magic incantation, but now that I see
    it, I realize that I should have told you to just use

    config ARCH_SUPPORTS_KPROBES
    def_bool y

    instead, which is a bit denser.

    We seem to use both kinds of syntax for these things, but this is really
    what "def_bool" is there for...

    Changelog :

    - Moving to HAVE_*.
    - Add AVR32 oprofile.

    Signed-off-by: Mathieu Desnoyers
    Cc: Andrew Morton
    Cc: Haavard Skinnemoen
    Cc: David Howells
    Cc: Jeff Dike
    Cc: Ananth N Mavinakayanahalli
    Signed-off-by: Sam Ravnborg

    Mathieu Desnoyers
     
  • The conflicting commit for
    move-kconfiginstrumentation-to-arch-kconfig-and-init-kconfig.patch
    is the ARM fix from Linus :

    commit 38ad9aebe70dc72df08851bbd1620d89329129ba

    He just seemed to agree that my approach (just putting the missing ARM
    config options in arch/arm/Kconfig) works too. The main advantage it has
    is that it is smaller, does not need a cleanup in the future and does
    not break the following patches unnecessarily.

    It's just been discussed here

    http://lkml.org/lkml/2008/1/15/267

    However, Linus might prefer to stay with his own patch and I would
    totally understand it that late in the release cycle. Therefore I submit
    this for the next release cycle.

    Signed-off-by: Mathieu Desnoyers
    Cc: Jeff Dike
    Cc: David Howells
    Cc: Ananth N Mavinakayanahalli
    CC: Russell King
    Signed-off-by: Sam Ravnborg

    Mathieu Desnoyers
     
  • kernel/ksysfs.c seems to be a random dumping group for misc globals
    that the rest of the tree depend on. This has caused problems with
    exports in the past when sysfs is disabled, which can already be
    observed in commit-id 51107301b629640f9ab76fe23bf385e187b9ac29.

    The latest one is the kernel_kobj usage, which presently results in:

    fs/built-in.o: In function `debugfs_init':
    inode.c:(.init.text+0xc34): undefined reference to `kernel_kobj'
    make: *** [.tmp_vmlinux1] Error 1

    kernel/ksysfs.c itself at this point only contains globals and some
    basic sysfs initialization, the sysfs initialization code is optimized
    out when we build with sysfs disabled. Given that, it's easier to just
    build in unconditionally, rather than trying to find some other random
    place to dump and initialize the globals.

    Additionally, the current trend seems to be decoupling of kobjects from
    sysfs, in which case it still makes sense to perform the kernel_kobj
    initialization that happens here even if sysfs is disabled, as
    lib/kobject.o is built-in unconditionally.

    Signed-off-by: Paul Mundt
    Signed-off-by: Greg Kroah-Hartman

    Paul Mundt
     

02 Feb, 2008

10 commits

  • * 'suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (38 commits)
    suspend: cleanup reference to swsusp_pg_dir[]
    PM: Remove obsolete /sys/devices/.../power/state docs
    Hibernation: Invoke suspend notifications after console switch
    Suspend: Invoke suspend notifications after console switch
    Suspend: Clean up suspend_64.c
    Suspend: Add config option to disable the freezer if architecture wants that
    ACPI: Print message before calling _PTS
    ACPI hibernation: Call _PTS before suspending devices
    Hibernation: Introduce begin() and end() callbacks
    ACPI suspend: Call _PTS before suspending devices
    ACPI: Separate disabling of GPEs from _PTS
    ACPI: Separate invocations of _GTS and _BFS from _PTS and _WAK
    Suspend: Introduce begin() and end() callbacks
    suspend: fix ia64 allmodconfig build
    ACPI: clear GPE earily in resume to avoid warning
    Suspend: Clean up Kconfig (V2)
    Hibernation: Clean up Kconfig (V2)
    Hibernation: Update messages
    Suspend: Use common prefix in messages
    Hibernation: Remove unnecessary variable declaration
    ...

    Linus Torvalds
     
  • Rafael J. Wysocki reported weird, multi-seconds delays during
    suspend/resume and bisected it back to:

    commit 82a1fcb90287052aabfa235e7ffc693ea003fe69
    Author: Ingo Molnar
    Date: Fri Jan 25 21:08:02 2008 +0100

    softlockup: automatically detect hung TASK_UNINTERRUPTIBLE tasks

    fix it:

    - restore the old wakeup mechanism
    - fix break usage in do_each_thread() { } while_each_thread().
    - fix the hotplug switch stmt, a fall-through case was broken.

    Bisected-by: Rafael J. Wysocki
    Signed-off-by: Peter Zijlstra
    Tested-by: Rafael J. Wysocki
    Signed-off-by: Ingo Molnar
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Following the recent change in the suspend code path, switch consoles before
    calling PM notifiers during hibernation.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     
  • In order to fix APM emulation it is necessary to enable apm-emulation
    notifications for suspends triggered in various ways via the suspend
    notifiers. However, this will cause the systems using APM emulation
    to lock up between X being needed to switch away from the VT and X
    already waiting for resume in the APM ioctl.

    This patch moves the console switch (if enabled) before the suspend
    notification (and after the resume notification) to avoid this issue.

    Signed-off-by: Johannes Berg
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Johannes Berg
     
  • This patch makes the freezer optional for suspend to allow the
    system to work (or not work) like the original PMU suspend.

    Signed-off-by: Johannes Berg
    Acked-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Johannes Berg
     
  • Introduce global hibernation callback .end() and rename global
    hibernation callback .start() to .begin(), in analogy with the
    recent modifications of the global suspend callbacks.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     
  • On ACPI systems the target state set by acpi_pm_set_target() is
    reset by acpi_pm_finish(), but that need not be called if the
    suspend fails.  All platforms that use the .set_target() global
    suspend callback are affected by analogous issues.

    For this reason, we need an additional global suspend callback that
    will reset the target state regardless of whether or not the suspend
    is successful.  Also, it is reasonable to rename the .set_target()
    callback, since it will be used for a different purpose on ACPI
    systems (due to ACPI 1.0x code ordering requirements).

    Introduce the global suspend callback .end() to be executed at the
    end of the suspend sequence and rename the .set_target() global
    suspend callback to .begin().

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     
  • kernel/power/main.c:488: error: ‘pm_test_attr’ undeclared here (not in a function)

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Rafael J. Wysocki
     
  • This cleans up the suspend Kconfig and removes the need to
    declare centrally which architectures support suspend. All
    architectures that currently support suspend are modified
    accordingly.

    Signed-off-by: Johannes Berg
    Acked-by: Russell King
    Acked-by: Paul Mackerras
    Acked-by: Ralf Baechle
    Acked-by: Paul Mundt
    Cc: Pavel Machek
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Johannes Berg
     
  • This cleans up the hibernation Kconfig and removes the need to
    declare centrally which architectures support hibernation. All
    architectures that currently support hibernation are modified
    accordingly.

    Signed-off-by: Johannes Berg
    Acked-by: Paul Mackerras
    Cc: Pavel Machek
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Len Brown

    Johannes Berg