10 Nov, 2009

1 commit

  • This enables us to avoid printing swiotlb memory info when we
    initialize swiotlb. After swiotlb initialization, we could find
    that we don't need swiotlb.

    This patch removes the code to print swiotlb memory info in
    swiotlb_init() and exports the function to do that.

    Signed-off-by: FUJITA Tomonori
    Cc: chrisw@sous-sol.org
    Cc: dwmw2@infradead.org
    Cc: joerg.roedel@amd.com
    Cc: muli@il.ibm.com
    Cc: tony.luck@intel.com
    Cc: benh@kernel.crashing.org
    LKML-Reference:
    [ -v2: merge up conflict ]
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

14 Oct, 2009

2 commits


25 Sep, 2009

1 commit

  • Back in January 2008 Nick Piggin implemented "ticket" spinlocks
    for X86 (See commit 314cdbefd1fd0a7acf3780e9628465b77ea6a836).

    IA64 implementation has a couple of differences because of the
    available atomic operations ... e.g. we have no fetchadd2 instruction
    that operates on a 16-bit quantity so we make ticket locks use
    a 32-bit word for each of the current ticket and now-serving values.

    Performance on uncontended locks is about 8% worse than the previous
    implementation, but this seems a good trade for determinism in the
    contended case. Performance impact on macro-level benchmarks is in
    the noise.

    Signed-off-by: Tony Luck

    Tony Luck
     

24 Sep, 2009

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (39 commits)
    cpumask: Move deprecated functions to end of header.
    cpumask: remove unused deprecated functions, avoid accusations of insanity
    cpumask: use new-style cpumask ops in mm/quicklist.
    cpumask: use mm_cpumask() wrapper: x86
    cpumask: use mm_cpumask() wrapper: um
    cpumask: use mm_cpumask() wrapper: mips
    cpumask: use mm_cpumask() wrapper: mn10300
    cpumask: use mm_cpumask() wrapper: m32r
    cpumask: use mm_cpumask() wrapper: arm
    cpumask: Use accessors for cpu_*_mask: um
    cpumask: Use accessors for cpu_*_mask: powerpc
    cpumask: Use accessors for cpu_*_mask: mips
    cpumask: Use accessors for cpu_*_mask: m32r
    cpumask: remove arch_send_call_function_ipi
    cpumask: arch_send_call_function_ipi_mask: s390
    cpumask: arch_send_call_function_ipi_mask: powerpc
    cpumask: arch_send_call_function_ipi_mask: mips
    cpumask: arch_send_call_function_ipi_mask: m32r
    cpumask: arch_send_call_function_ipi_mask: alpha
    cpumask: remove obsolete topology_core_siblings and topology_thread_siblings: ia64
    ...

    Linus Torvalds
     
  • smp_call_function_many is the new version: it takes a pointer. Also,
    use mm accessor macro while we're changing this.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits)
    Use macros for .data.page_aligned section.
    Use macros for .bss.page_aligned section.
    Use new __init_task_data macro in arch init_task.c files.
    kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts.
    arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0
    kbuild: add static to prototypes
    kbuild: fail build if recordmcount.pl fails
    kbuild: set -fconserve-stack option for gcc 4.5
    kbuild: echo the record_mcount command
    gconfig: disable "typeahead find" search in treeviews
    kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling
    checkincludes.pl: add option to remove duplicates in place
    markup_oops: use modinfo to avoid confusion with underscored module names
    checkincludes.pl: provide usage helper
    checkincludes.pl: close file as soon as we're done with it
    ctags: usability fix
    kernel hacking: move STRIP_ASM_SYMS from General
    gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma
    kbuild: Check if linker supports the -X option
    kbuild: introduce ld-option
    ...

    Fix trivial conflict in scripts/basic/fixdep.c

    Linus Torvalds
     
  • * git://git.infradead.org/iommu-2.6: (23 commits)
    intel-iommu: Disable PMRs after we enable translation, not before
    intel-iommu: Kill DMAR_BROKEN_GFX_WA option.
    intel-iommu: Fix integer wrap on 32 bit kernels
    intel-iommu: Fix integer overflow in dma_pte_{clear_range,free_pagetable}()
    intel-iommu: Limit DOMAIN_MAX_PFN to fit in an 'unsigned long'
    intel-iommu: Fix kernel hang if interrupt remapping disabled in BIOS
    intel-iommu: Disallow interrupt remapping if not all ioapics covered
    intel-iommu: include linux/dmi.h to use dmi_ routines
    pci/dmar: correct off-by-one error in dmar_fault()
    intel-iommu: Cope with yet another BIOS screwup causing crashes
    intel-iommu: iommu init error path bug fixes
    intel-iommu: Mark functions with __init
    USB: Work around BIOS bugs by quiescing USB controllers earlier
    ia64: IOMMU passthrough mode shouldn't trigger swiotlb init
    intel-iommu: make domain_add_dev_info() call domain_context_mapping()
    intel-iommu: Unify hardware and software passthrough support
    intel-iommu: Cope with broken HP DC7900 BIOS
    iommu=pt is a valid early param
    intel-iommu: double kfree()
    intel-iommu: Kill pointless intel_unmap_single() function
    ...

    Fixed up trivial include lines conflict in drivers/pci/intel-iommu.c

    Linus Torvalds
     

21 Sep, 2009

1 commit


20 Sep, 2009

1 commit


19 Sep, 2009

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
    [IA64] Clean up linker script using standard macros.
    [IA64] Use standard macros for page-aligned data.
    [IA64] Use .ref.text, not .text.init for start_ap.
    [IA64] sgi-xp: fix printk format warnings
    [IA64] ioc4_serial: fix printk format warnings
    [IA64] mbcs: fix printk format warnings
    [IA64] pci_br, fix infinite loop in find_free_ate()
    [IA64] kdump: Short path to freeze CPUs
    [IA64] kdump: Try INIT regardless of
    [IA64] kdump: Mask INIT first in panic-kdump path
    [IA64] kdump: Don't return APs to SAL from kdump
    [IA64] kexec: Unregister MCA handler before kexec
    [IA64] kexec: Make INIT safe while transition to
    [IA64] kdump: Mask MCA/INIT on frozen cpus

    Fix up conflict in arch/ia64/kernel/vmlinux.lds.S as per Tony's
    suggestion.

    Linus Torvalds
     

17 Sep, 2009

1 commit

  • The "cleanup console_print()" patch in commit
    353f6dd2dec992ddd34620a94b051b0f76227379 introduced an "extern"
    declaration into an assembly language file. Remove it.

    Signed-off-by: Anirban Sinha
    Signed-off-by: Tony Luck
    Signed-off-by: Linus Torvalds

    Anirban Sinha
     

16 Sep, 2009

4 commits

  • Aside from using fewer output sections and moving some data around,
    the main side effect of this change is changing the alignment of some
    sections. In particular:

    * cachline-aligned and read_mostly data are now aligned to
    SMP_CACHE_BYTES. (Previously, they were laid out consecutively after
    a PAGE_SIZE alignment)
    * .init.ramfs is now page-aligned, per the INIT_RAM_FS
    macro. (Previously it had no explicit alignment).

    Signed-off-by: Nelson Elhage
    Signed-off-by: Tony Luck

    Nelson Elhage
     
  • Signed-off-by: Nelson Elhage
    Signed-off-by: Tony Luck

    Nelson Elhage
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits)
    powerpc64: convert to dynamic percpu allocator
    sparc64: use embedding percpu first chunk allocator
    percpu: kill lpage first chunk allocator
    x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA
    percpu: update embedding first chunk allocator to handle sparse units
    percpu: use group information to allocate vmap areas sparsely
    vmalloc: implement pcpu_get_vm_areas()
    vmalloc: separate out insert_vmalloc_vm()
    percpu: add chunk->base_addr
    percpu: add pcpu_unit_offsets[]
    percpu: introduce pcpu_alloc_info and pcpu_group_info
    percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward
    percpu: add @align to pcpu_fc_alloc_fn_t
    percpu: make @dyn_size mandatory for pcpu_setup_first_chunk()
    percpu: drop @static_size from first chunk allocators
    percpu: generalize first chunk allocator selection
    percpu: build first chunk allocators selectively
    percpu: rename 4k first chunk allocator to page
    percpu: improve boot messages
    percpu: fix pcpu_reclaim() locking
    ...

    Fix trivial conflict as by Tejun Heo in kernel/sched.c

    Linus Torvalds
     
  • It seems that start_ap doesn't need to be in a special location in the
    kernel, but it references some init code so it should be in .ref.text.

    Since this is the only thing in the .text.head section, eliminate
    .text.head from the linker script.

    Signed-off-by: Tim Abbott
    Signed-off-by: Tony Luck

    Tim Abbott
     

15 Sep, 2009

8 commits

  • console_print() is an old legacy interface mostly unused in the entire
    kernel tree. It's best to clean up its existing use and let developers
    use their own implementation of it as they feel fit.

    Signed-off-by: Anirban Sinha
    Signed-off-by: Linus Torvalds

    Anirban Sinha
     
  • Setting monarch_cpu = -1 to let slaves frozen might not work, because
    there might be slaves being late, not entered the rendezvous yet.
    Such slaves might be caught in while (monarch_cpu == -1) loop.

    Use kdump_in_progress instead of monarch_cpus to break INIT rendezvous
    and let all slaves enter DIE_INIT_SLAVE_LEAVE smoothly.

    And monarch no longer need to manage rendezvous if once kdump_in_progress
    is set, catch the monarch in DIE_INIT_MONARCH_ENTER then.

    Signed-off-by: Hidetoshi Seto
    Cc: Vivek Goyal
    Cc: Haren Myneni
    Cc: kexec@lists.infradead.org
    Acked-by: Fenghua Yu
    Signed-off-by: Tony Luck

    Hidetoshi Seto
     
  • kdump_on_init

    CPUs should be frozen if possible, otherwise it might hinder kdump.
    So if there are CPUs not respond to IPI, try INIT to stop them.

    Signed-off-by: Hidetoshi Seto
    Cc: Vivek Goyal
    Cc: Haren Myneni
    Cc: kexec@lists.infradead.org
    Acked-by: Fenghua Yu
    Signed-off-by: Tony Luck

    Hidetoshi Seto
     
  • Summary:

    Asserting INIT might block kdump if the system is already going to
    start kdump via panic.

    Description:

    INIT can interrupt anywhere in panic path, so it can interrupt in
    middle of kdump kicked by panic. Therefore there is a race if kdump
    is kicked concurrently, via Panic and via INIT.

    INIT could fail to invoke kdump if the system is already going to
    start kdump via panic. It could not restart kdump from INIT handler
    if some of cpus are already playing dead with INIT masked. It also
    means that INIT could block kdump's progress if no monarch is entered
    in the INIT rendezvous.

    Panic+INIT is a rare, but possible situation since it can be assumed
    that the kernel or an internal agent decides to panic the unstable
    system while another external agent decides to send an INIT to the
    system at same time.

    How to reproduce:

    Assert INIT just after panic, before all other cpus have frozen

    Expected results:

    continue kdump invoked by panic, or restart kdump from INIT

    Actual results:

    might be hang, crashdump not retrieved

    Proposed Fix:

    This patch masks INIT first in panic path to take the initiative on
    kdump, and reuse atomic value kdump_in_progress to make sure there is
    only one initiator of kdump. All INITs asserted later should be used
    only for freezing all other cpus.

    This mask will be removed soon by rfi in relocate_kernel.S, before jump
    into kdump kernel, after all cpus are frozen and no-op INIT handler is
    registered. So if INIT was in the interval while it is masked, it will
    pend on the system and will received just after the rfi, and handled by
    the no-op handler.

    If there was a MCA event while psr.mc is 1, in theory the event will
    pend on the system and will received just after the rfi same as above.
    MCA handler is unregistered here at the time, so received MCA will not
    reach to OS_MCA and will result in warmboot by SAL.

    Note that codes in this masked interval are relatively simpler than
    that in MCA/INIT handler which also executed with the mask. So it can
    be said that probability of error in this interval is supposed not so
    higher than that in MCA/INIT handler.

    Signed-off-by: Hidetoshi Seto
    Cc: Vivek Goyal
    Cc: Haren Myneni
    Cc: kexec@lists.infradead.org
    Acked-by: Fenghua Yu
    Signed-off-by: Tony Luck

    Hidetoshi Seto
     
  • Summary:

    Asserting INIT on cpu going to be offline will result in unexpected
    behavior. It will be a real problem in kdump cases where INIT might
    be asserted to unstable APs going to be offline by returning to SAL.

    Description:

    Since psr.mc is cleared when bits in psr are set to SAL_PSR_BITS_TO_SET
    in ia64_jump_to_sal(), there is a small window (~few msecs) that the
    cpu can receive INIT even if the cpu enter there via INIT handler.
    In this window we do restore of registers for SAL, so INIT asserted
    here will not work properly.

    It is hard to remove this window by masking INIT (i.e. setting psr.mc)
    because we have to unmask it later in OS, because we have to use branch
    instruction (br.ret, not rfi) to return SAL, due to OS_BOOT_RENDEZ to
    SAL return convention.

    I suppose this window will not be a real problem on cpu offline if we
    can educate people not to push INIT button during hotplug operation.
    However, only exception is a race in kdump and INIT. Now kdump returns
    APs to SAL before processing dump, but the kernel might receive INIT at
    that point in time. Such INIT might be asserted by kdump itself if an
    AP doesn't react IPI soon and kdump decided to use INIT to stop the AP.
    Or it might be asserted by operator or an external agent to start dump
    on the unstable system.

    Such panic+INIT or INIT+INIT cases should be rare, but it will be happy
    if we can retrieve crashdump even in such cases.

    How to reproduce:

    panic+INIT or INIT+INIT, with kdump configured

    Expected results:

    crashdump is retrieved anyway

    Actual results:

    panic, hang etc. (unexpected)

    Proposed fix

    To avoid the window on the way to SAL, this patch stops returning APs
    to SAL in case of kdump. In other words, this patch makes APs spin
    in OS instead of spinning in SAL.

    (* Note: What impact would be there? If a cpu is spinning in SAL,
    the cpu is in BOOT_RENDEZ loop, as same as offlined cpu.
    In theory if an INIT is asserted there, cpus in the BOOT_RENDEZ loop
    should not invoke OS_INIT on it. So in either way, no matter where
    the cpu is spinning actually in, once cpu starts spin and act as
    "frozen," INIT on the cpu have no effects.
    From another point of view, all debug information on the cpu should
    have stored to memory before the cpu start to be frozen. So no more
    action on the cpu is required.)

    I confirmed that the kdump sometime hangs by concurrent INITs (another
    INIT after an INIT), and it doesn't hang after applying this patch.

    Signed-off-by: Hidetoshi Seto
    Cc: Vivek Goyal
    Cc: Haren Myneni
    Cc: kexec@lists.infradead.org
    Acked-by: Fenghua Yu
    Signed-off-by: Tony Luck

    Hidetoshi Seto
     
  • Summary:

    MCA on the beginning of kdump/kexec kernel will result in unexpected
    behavior because MCA handler for previous kernel is invoked on the
    kdump kernel.

    Description:

    Once a cpu is passed to new kernel, all resources in previous kernel
    should not be used from the cpu. Even the resources for MCA handler
    are no exception. So we cannot handle MCAs and its machine check
    errors during kernel transition, until new handler for new kernel is
    registered with new resources ready for handling the MCA.

    How to reproduce:

    Assert MCA while kdump kernel is booting, before new MCA handler for
    kdump kernel is registered.

    Expected(Desirable) results:

    No recovery, cancel kdump and reboot the system.

    Actual results:

    MCA handler for previous kernel is invoked on the kdump kernel.
    => panic, hang etc. (unexpected)

    Proposed fix:

    To avoid entering MCA handler from early stage of new kernel,
    unregister the entry point from SAL before leave from current
    kernel. Then SAL will make all MCAs to warmboot safely, without
    invoking OS_MCA.

    Signed-off-by: Hidetoshi Seto
    Cc: Vivek Goyal
    Cc: Haren Myneni
    Cc: kexec@lists.infradead.org
    Acked-by: Fenghua Yu
    Signed-off-by: Tony Luck

    Hidetoshi Seto
     
  • kdump/kexec kernel

    Summary:

    Asserting INIT on the beginning of kdump/kexec kernel will result
    in unexpected behavior because INIT handler for previous kernel is
    invoked on new kernel.

    Description:

    In panic situation, we can receive INIT while kernel transition,
    i.e. from beginning of panic to bootstrap of kdump kernel.
    Since we initialize registers on leave from current kernel, no
    longer monarch/slave handlers of current kernel in virtual mode are
    called safely. (In fact system goes hang as far as I confirmed)

    How to Reproduce:

    Start kdump
    # echo c > /proc/sysrq-trigger
    Then assert INIT while kdump kernel is booting, before new INIT
    handler for kdump kernel is registered.

    Expected(Desirable) result:

    kdump kernel boots without any problem, crashdump retrieved

    Actual result:

    INIT handler for previous kernel is invoked on kdump kernel
    => panic, hang etc. (unexpected)

    Proposed fix:

    We can unregister these init handlers from SAL before jumping into
    new kernel, however then the INIT will fallback to default behavior,
    result in warmboot by SAL (according to the SAL specification) and
    we cannot retrieve the crashdump.

    Therefore this patch introduces a NOP init handler and register it
    to SAL before leave from current kernel, to start kdump safely by
    preventing INITs from entering virtual mode and resulting in warmboot.

    On the other hand, in case of kexec that not for kdump, it also
    has same problem with INIT while kernel transition.
    This patch handles this case differently, because for kexec
    unregistering handlers will be preferred than registering NOP
    handler, since the situation "no handlers registered" is usual
    state for kernel's entry.

    Signed-off-by: Hidetoshi Seto
    Cc: Vivek Goyal
    Cc: Haren Myneni
    Cc: kexec@lists.infradead.org
    Acked-by: Fenghua Yu
    Signed-off-by: Tony Luck

    Hidetoshi Seto
     
  • Summary:

    INIT asserted on kdump kernel invokes INIT handler not only on a
    cpu that running on the kdump kernel, but also BSP of the panicked
    kernel, because the (badly) frozen BSP can be thawed by INIT.

    Description:

    The kdump_cpu_freeze() is called on cpus except one that initiates
    panic and/or kdump, to stop/offline the cpu (on ia64, it means we
    pass control of cpus to SAL, or put them in spinloop). Note that
    CPU0(BSP) always go to spinloop, so if panic was happened on an AP,
    there are at least 2cpus (= the AP and BSP) which not back to SAL.

    On the spinning cpus, interrupts are disabled (rsm psr.i), but INIT
    is still interruptible because psr.mc for mask them is not set unless
    kdump_cpu_freeze() is not called from MCA/INIT context.

    Therefore, assume that a panic was happened on an AP, kdump was
    invoked, new INIT handlers for kdump kernel was registered and then
    an INIT is asserted. From the viewpoint of SAL, there are 2 online
    cpus, so INIT will be delivered to both of them. It likely means
    that not only the AP (= a cpu executing kdump) enters INIT handler
    which is newly registered, but also BSP (= another cpu spinning in
    panicked kernel) enters the same INIT handler. Of course setting of
    registers in BSP are still old (for panicked kernel), so what happen
    with running handler with wrong setting will be extremely unexpected.
    I believe this is not desirable behavior.

    How to Reproduce:

    Start kdump on one of APs (e.g. cpu1)
    # taskset 0x2 echo c > /proc/sysrq-trigger
    Then assert INIT after kdump kernel is booted, after new INIT handler
    for kdump kernel is registered.

    Expected results:

    An INIT handler is invoked only on the AP.

    Actual results:

    An INIT handler is invoked on the AP and BSP.

    Sample of results:

    I got following console log by asserting INIT after prompt "root:/>".
    It seems that two monarchs appeared by one INIT, and one panicked at
    last. And it also seems that the panicked one supposed there were
    4 online cpus and no one did rendezvous:

    :
    [ 0 %]dropping to initramfs shell
    exiting this shell will reboot your system
    root:/> Entered OS INIT handler. PSP=fff301a0 cpu=0 monarch=0
    ia64_init_handler: Promoting cpu 0 to monarch.
    Delaying for 5 seconds...
    All OS INIT slaves have reached rendezvous
    Processes interrupted by INIT - 0 (cpu 0 task 0xa000000100af0000)
    :
    <>
    :
    Entered OS INIT handler. PSP=fff301a0 cpu=0 monarch=1
    Delaying for 5 seconds...
    mlogbuf_finish: printing switched to urgent mode, MCA/INIT might be dodgy or fail.
    OS INIT slave did not rendezvous on cpu 1 2 3
    INIT swapper 0[0]: bugcheck! 0 [1]
    :
    <>
    :
    Kernel panic - not syncing: Attempted to kill the idle task!

    Proposed fix:

    To avoid this problem, this patch inserts ia64_set_psr_mc() to mask
    INIT on cpus going to be frozen. This masking have no effect if the
    kdump_cpu_freeze() is called from INIT handler when kdump_on_init == 1,
    because psr.mc is already turned on to 1 before entering OS_INIT.
    I confirmed that weird log like above are disappeared after applying
    this patch.

    Signed-off-by: Hidetoshi Seto
    Cc: Vivek Goyal
    Cc: Haren Myneni
    Cc: kexec@lists.infradead.org
    Acked-by: Fenghua Yu
    Signed-off-by: Tony Luck

    Hidetoshi Seto
     

11 Sep, 2009

1 commit


03 Sep, 2009

1 commit

  • arch/ia64/kernel/dma-mapping.c:14: warning: control reaches end of non-void function
    arch/ia64/kernel/dma-mapping.c:14: warning: no return statement in function returning non-void

    This warning was introduced by commit: 390bd132b2831a2ad0268e84bffbfc0680debfe5
    Add dma_debug_init() for ia64

    Signed-off-by: Tony Luck

    Luck, Tony
     

02 Sep, 2009

1 commit

  • Add a keyctl to install a process's session keyring onto its parent. This
    replaces the parent's session keyring. Because the COW credential code does
    not permit one process to change another process's credentials directly, the
    change is deferred until userspace next starts executing again. Normally this
    will be after a wait*() syscall.

    To support this, three new security hooks have been provided:
    cred_alloc_blank() to allocate unset security creds, cred_transfer() to fill in
    the blank security creds and key_session_to_parent() - which asks the LSM if
    the process may replace its parent's session keyring.

    The replacement may only happen if the process has the same ownership details
    as its parent, and the process has LINK permission on the session keyring, and
    the session keyring is owned by the process, and the LSM permits it.

    Note that this requires alteration to each architecture's notify_resume path.
    This has been done for all arches barring blackfin, m68k* and xtensa, all of
    which need assembly alteration to support TIF_NOTIFY_RESUME. This allows the
    replacement to be performed at the point the parent process resumes userspace
    execution.

    This allows the userspace AFS pioctl emulation to fully emulate newpag() and
    the VIOCSETTOK and VIOCSETTOK2 pioctls, all of which require the ability to
    alter the parent process's PAG membership. However, since kAFS doesn't use
    PAGs per se, but rather dumps the keys into the session keyring, the session
    keyring of the parent must be replaced if, for example, VIOCSETTOK is passed
    the newpag flag.

    This can be tested with the following program:

    #include
    #include
    #include

    #define KEYCTL_SESSION_TO_PARENT 18

    #define OSERROR(X, S) do { if ((long)(X) == -1) { perror(S); exit(1); } } while(0)

    int main(int argc, char **argv)
    {
    key_serial_t keyring, key;
    long ret;

    keyring = keyctl_join_session_keyring(argv[1]);
    OSERROR(keyring, "keyctl_join_session_keyring");

    key = add_key("user", "a", "b", 1, keyring);
    OSERROR(key, "add_key");

    ret = keyctl(KEYCTL_SESSION_TO_PARENT);
    OSERROR(ret, "KEYCTL_SESSION_TO_PARENT");

    return 0;
    }

    Compiled and linked with -lkeyutils, you should see something like:

    [dhowells@andromeda ~]$ keyctl show
    Session Keyring
    -3 --alswrv 4043 4043 keyring: _ses
    355907932 --alswrv 4043 -1 \_ keyring: _uid.4043
    [dhowells@andromeda ~]$ /tmp/newpag
    [dhowells@andromeda ~]$ keyctl show
    Session Keyring
    -3 --alswrv 4043 4043 keyring: _ses
    1055658746 --alswrv 4043 4043 \_ user: a
    [dhowells@andromeda ~]$ /tmp/newpag hello
    [dhowells@andromeda ~]$ keyctl show
    Session Keyring
    -3 --alswrv 4043 4043 keyring: hello
    340417692 --alswrv 4043 4043 \_ user: a

    Where the test program creates a new session keyring, sticks a user key named
    'a' into it and then installs it on its parent.

    Signed-off-by: David Howells
    Signed-off-by: James Morris

    David Howells
     

14 Aug, 2009

2 commits

  • Conflicts:
    arch/sparc/kernel/smp_64.c
    arch/x86/kernel/cpu/perf_counter.c
    arch/x86/kernel/setup_percpu.c
    drivers/cpufreq/cpufreq_ondemand.c
    mm/percpu.c

    Conflicts in core and arch percpu codes are mostly from commit
    ed78e1e078dd44249f88b1dd8c76dafb39567161 which substituted many
    num_possible_cpus() with nr_cpu_ids. As for-next branch has moved all
    the first chunk allocators into mm/percpu.c, the changes are moved
    from arch code to mm/percpu.c.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Since commit 19943b0e30b05d42e494ae6fef78156ebc8c637e ('intel-iommu:
    Unify hardware and software passthrough support'), hardware passthrough
    mode will do the same as software passthrough mode was doing -- it'll
    still use the IOMMU normally for devices which can't address all of
    memory. This means that we don't need to bother with swiotlb.

    Signed-off-by: David Woodhouse

    David Woodhouse
     

12 Aug, 2009

4 commits


17 Jul, 2009

1 commit

  • The commit 9916219579d078c80377dd3988c2cc213536d868 was supposed to
    add CONFIG_DMA_API_DEBUG support to IA64 however I forgot to add
    dma_debug_init().

    Signed-off-by: fujita
    Acked-by: Fenghua Yu

    fujita
     

15 Jul, 2009

1 commit

  • Fix ia64 build setup_per_cpu_areas() redifinition issue in UP
    configuration. When compiling ia64 kernel in UP configuration, the
    following compilation errors are reported:

    arch/ia64/kernel/setup.c:860: error: redefinition of 'setup_per_cpu_areas'
    include/linux/percpu.h:185: error: previous definition of 'setup_per_cpu_areas' was here

    The patch fixes the issue in arch/ia64/kernel/setup.c

    Signed-off-by: Fenghua Yu
    Signed-off-by: Tejun Heo

    Fenghua Yu
     

13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

09 Jul, 2009

1 commit

  • Discarded sections in different archs share some commonality but have
    considerable differences. This led to linker script for each arch
    implementing its own /DISCARD/ definition, which makes maintaining
    tedious and adding new entries error-prone.

    This patch makes all linker scripts to move discard definitions to the
    end of the linker script and use the common DISCARDS macro. As ld
    uses the first matching section definition, archs can include default
    discarded sections by including them earlier in the linker script.

    ia64 is notable because it first throws away some ia64 specific
    subsections and then include the rest of the sections into the final
    image, so those sections must be discarded before the inclusion.

    defconfig compile tested for x86, x86-64, powerpc, powerpc64, ia64,
    alpha, sparc, sparc64 and s390. Michal Simek tested microblaze.

    Signed-off-by: Tejun Heo
    Acked-by: Paul Mundt
    Acked-by: Mike Frysinger
    Tested-by: Michal Simek
    Cc: linux-arch@vger.kernel.org
    Cc: Michal Simek
    Cc: microblaze-uclinux@itee.uq.edu.au
    Cc: Sam Ravnborg
    Cc: Tony Luck

    Tejun Heo
     

04 Jul, 2009

1 commit

  • Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix
    changes. As alpha in percpu tree uses 'weak' attribute instead of
    inline assembly, there's no need for __used attribute.

    Conflicts:
    arch/alpha/include/asm/percpu.h
    arch/mn10300/kernel/vmlinux.lds.S
    include/linux/percpu-defs.h

    Tejun Heo
     

01 Jul, 2009

2 commits

  • perfmon.c has a dubious cast directly from "int" to "void *". Add
    an intermediate cast to "long" to keep gcc happy.

    salinfo.c uses "down_trylock()" in a highly creative way (explained
    in the comments in the file) ... but it does kick out this warning:

    arch/ia64/kernel/salinfo.c:195: warning: ignoring return value of 'down_trylock'

    which people occasionally try to "fix" in ways that do not work. Use some
    casts to keep gcc quiet.

    Signed-off-by: Jan Beulich
    Signed-off-by: Tony Luck

    Jan Beulich
     
  • Signed-off-by: Joe Perches
    Signed-off-by: Tony Luck

    Joe Perches