02 Oct, 2009

1 commit

  • Fix some build failures when using gcc-4.x for MN10300.

    Firstly, __get_user() fails to build because the pointer points to a const and
    __gu_val ends up being read-only:

    In file included from include/linux/mempolicy.h:62,
    from init/main.c:50:
    include/linux/pagemap.h: In function 'fault_in_pages_readable':
    include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
    make[1]: *** [init/main.o] Error 1

    Secondly, gcc-4 doesn't allow casts of lvalues:

    UPD include/linux/compile.h
    arch/mn10300/kernel/rtc.c: In function 'calibrate_clock':
    arch/mn10300/kernel/rtc.c:170: error: lvalue required as left operand of assignment
    arch/mn10300/kernel/rtc.c:172: error: lvalue required as left operand of assignment
    make[1]: *** [arch/mn10300/kernel/rtc.o] Error 1

    These are seen with gcc 4.2.1.

    Signed-off-by: Mark Salter
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Salter
     

25 Sep, 2009

1 commit


24 Sep, 2009

6 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
     
  • * remove asm/atomic.h inclusion from linux/utsname.h --
    not needed after kref conversion
    * remove linux/utsname.h inclusion from files which do not need it

    NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however
    due to some personality stuff it _is_ needed -- cowardly leave ELF-related
    headers and files alone.

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

    Alexey Dobriyan
     
  • Makes code futureproof against the impending change to mm->cpu_vm_mask
    (to be a pointer).

    It's also a chance to use the new cpumask_ ops which take a pointer
    (the older ones are deprecated, but there's no hurry for arch code).

    Also change the actual arg name here to "mm" (which it is), not "task".

    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
     
  • Commit ebd2c8f6d2ec4012c267ecb95e72a57b8355a705 removed struct uart_info and
    commit bdc04e3174e18f475289fa8f4144f66686326b7e further moved delta_msr_wait.
    Fix up the MN10300 on-chip serial port drivers to comply with this.

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Impact: cleanup

    No need for redeclaration.

    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    Rusty Russell
     

23 Sep, 2009

1 commit

  • Make all seq_operations structs const, to help mitigate against
    revectoring user-triggerable function pointers.

    This is derived from the grsecurity patch, although generated from scratch
    because it's simpler than extracting the changes from there.

    Signed-off-by: James Morris
    Acked-by: Serge Hallyn
    Acked-by: Casey Schaufler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    James Morris
     

22 Sep, 2009

4 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    trivial: fix typo in aic7xxx comment
    trivial: fix comment typo in drivers/ata/pata_hpt37x.c
    trivial: typo in kernel-parameters.txt
    trivial: fix typo in tracing documentation
    trivial: add __init/__exit macros in drivers/gpio/bt8xxgpio.c
    trivial: add __init macro/ fix of __exit macro location in ipmi_poweroff.c
    trivial: remove unnecessary semicolons
    trivial: Fix duplicated word "options" in comment
    trivial: kbuild: remove extraneous blank line after declaration of usage()
    trivial: improve help text for mm debug config options
    trivial: doc: hpfall: accept disk device to unload as argument
    trivial: doc: hpfall: reduce risk that hpfall can do harm
    trivial: SubmittingPatches: Fix reference to renumbered step
    trivial: fix typos "man[ae]g?ment" -> "management"
    trivial: media/video/cx88: add __init/__exit macros to cx88 drivers
    trivial: fix typo in CONFIG_DEBUG_FS in gcov doc
    trivial: fix missing printk space in amd_k7_smp_check
    trivial: fix typo s/ketymap/keymap/ in comment
    trivial: fix typo "to to" in multiple files
    trivial: fix typos in comments s/DGBU/DBGU/
    ...

    Linus Torvalds
     
  • A number of architectures have identical asm/mman.h files so they can all
    be merged by using the new generic file.

    The remaining asm/mman.h files are substantially different from each
    other.

    Signed-off-by: Arnd Bergmann
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Add a flag for mmap that will be used to request a huge page region that
    will look like anonymous memory to user space. This is accomplished by
    using a file on the internal vfsmount. MAP_HUGETLB is a modifier of
    MAP_ANONYMOUS and so must be specified with it. The region will behave
    the same as a MAP_ANONYMOUS region using small pages.

    The patch also adds the MAP_STACK flag, which was previously defined only
    on some architectures but not on others. Since MAP_STACK is meant to be a
    hint only, architectures can define it without assigning a specific
    meaning to it.

    Signed-off-by: Arnd Bergmann
    Cc: Eric B Munson
    Cc: Hugh Dickins
    Cc: David Rientjes
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Commit 96177299416dbccb73b54e6b344260154a445375 ("Drop free_pages()")
    modified nr_free_pages() to return 'unsigned long' instead of 'unsigned
    int'. This made the casts to 'unsigned long' in most callers superfluous,
    so remove them.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Christoph Lameter
    Acked-by: Ingo Molnar
    Acked-by: Russell King
    Acked-by: David S. Miller
    Acked-by: Kyle McMartin
    Acked-by: WANG Cong
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Haavard Skinnemoen
    Cc: Mikael Starvik
    Cc: "Luck, Tony"
    Cc: Hirokazu Takata
    Cc: Ralf Baechle
    Cc: David Howells
    Acked-by: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Chris Zankel
    Cc: Michal Simek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

21 Sep, 2009

3 commits

  • Signed-off-by: Uwe Kleine-Koenig
    Signed-off-by: Jiri Kosina

    Uwe Kleine-Koenig
     
  • Bye-bye Performance Counters, welcome Performance Events!

    In the past few months the perfcounters subsystem has grown out its
    initial role of counting hardware events, and has become (and is
    becoming) a much broader generic event enumeration, reporting, logging,
    monitoring, analysis facility.

    Naming its core object 'perf_counter' and naming the subsystem
    'perfcounters' has become more and more of a misnomer. With pending
    code like hw-breakpoints support the 'counter' name is less and
    less appropriate.

    All in one, we've decided to rename the subsystem to 'performance
    events' and to propagate this rename through all fields, variables
    and API names. (in an ABI compatible fashion)

    The word 'event' is also a bit shorter than 'counter' - which makes
    it slightly more convenient to write/handle as well.

    Thanks goes to Stephane Eranian who first observed this misnomer and
    suggested a rename.

    User-space tooling and ABI compatibility is not affected - this patch
    should be function-invariant. (Also, defconfigs were not touched to
    keep the size down.)

    This patch has been generated via the following script:

    FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

    sed -i \
    -e 's/PERF_EVENT_/PERF_RECORD_/g' \
    -e 's/PERF_COUNTER/PERF_EVENT/g' \
    -e 's/perf_counter/perf_event/g' \
    -e 's/nb_counters/nb_events/g' \
    -e 's/swcounter/swevent/g' \
    -e 's/tpcounter_event/tp_event/g' \
    $FILES

    for N in $(find . -name perf_counter.[ch]); do
    M=$(echo $N | sed 's/perf_counter/perf_event/g')
    mv $N $M
    done

    FILES=$(find . -name perf_event.*)

    sed -i \
    -e 's/COUNTER_MASK/REG_MASK/g' \
    -e 's/COUNTER/EVENT/g' \
    -e 's/\/event_id/g' \
    -e 's/counter/event/g' \
    -e 's/Counter/Event/g' \
    $FILES

    ... to keep it as correct as possible. This script can also be
    used by anyone who has pending perfcounters patches - it converts
    a Linux kernel tree over to the new naming. We tried to time this
    change to the point in time where the amount of pending patches
    is the smallest: the end of the merge window.

    Namespace clashes were fixed up in a preparatory patch - and some
    stylistic fallout will be fixed up in a subsequent patch.

    ( NOTE: 'counters' are still the proper terminology when we deal
    with hardware registers - and these sed scripts are a bit
    over-eager in renaming them. I've undone some of that, but
    in case there's something left where 'counter' would be
    better than 'event' we can undo that on an individual basis
    instead of touching an otherwise nicely automated patch. )

    Suggested-by: Stephane Eranian
    Acked-by: Peter Zijlstra
    Acked-by: Paul Mackerras
    Reviewed-by: Arjan van de Ven
    Cc: Mike Galbraith
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Cc: Steven Rostedt
    Cc: Benjamin Herrenschmidt
    Cc: David Howells
    Cc: Kyle McMartin
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc:
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Signed-off-by: Joe Perches
    Signed-off-by: Tim Abbott
    Acked-by: Paul Mundt
    Signed-off-by: Sam Ravnborg

    Joe Perches
     

20 Sep, 2009

1 commit


16 Sep, 2009

2 commits

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (75 commits)
    PCI hotplug: clean up acpi_run_hpp()
    PCI hotplug: acpiphp: use generic pci_configure_slot()
    PCI hotplug: shpchp: use generic pci_configure_slot()
    PCI hotplug: pciehp: use generic pci_configure_slot()
    PCI hotplug: add pci_configure_slot()
    PCI hotplug: clean up acpi_get_hp_params_from_firmware() interface
    PCI hotplug: acpiphp: don't cache hotplug_params in acpiphp_bridge
    PCI hotplug: acpiphp: remove superfluous _HPP/_HPX evaluation
    PCI: Clear saved_state after the state has been restored
    PCI PM: Return error codes from pci_pm_resume()
    PCI: use dev_printk in quirk messages
    PCI / PCIe portdrv: Fix pcie_portdrv_slot_reset()
    PCI Hotplug: convert acpi_pci_detect_ejectable() to take an acpi_handle
    PCI Hotplug: acpiphp: find bridges the easy way
    PCI: pcie portdrv: remove unused variable
    PCI / ACPI PM: Propagate wake-up enable for devices w/o ACPI support
    ACPI PM: Replace wakeup.prepared with reference counter
    PCI PM: Introduce device flag wakeup_prepared
    PCI / ACPI PM: Rework some debug messages
    PCI PM: Simplify PCI wake-up code
    ...

    Fixed up conflict in arch/powerpc/kernel/pci_64.c due to OF device tree
    scanning having been moved and merged for the 32- and 64-bit cases. The
    'needs_freset' initialization added in 6e19314cc ("PCI/powerpc: support
    PCIe fundamental reset") is now in arch/powerpc/kernel/pci_of_scan.c.

    Linus Torvalds
     
  • * '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
     

15 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
    netxen: update copyright
    netxen: fix tx timeout recovery
    netxen: fix file firmware leak
    netxen: improve pci memory access
    netxen: change firmware write size
    tg3: Fix return ring size breakage
    netxen: build fix for INET=n
    cdc-phonet: autoconfigure Phonet address
    Phonet: back-end for autoconfigured addresses
    Phonet: fix netlink address dump error handling
    ipv6: Add IFA_F_DADFAILED flag
    net: Add DEVTYPE support for Ethernet based devices
    mv643xx_eth.c: remove unused txq_set_wrr()
    ucc_geth: Fix hangs after switching from full to half duplex
    ucc_geth: Rearrange some code to avoid forward declarations
    phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
    drivers/net/phy: introduce missing kfree
    drivers/net/wan: introduce missing kfree
    net: force bridge module(s) to be GPL
    Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
    ...

    Fixed up trivial conflicts:

    - arch/x86/include/asm/socket.h

    converted to in the x86 tree. The generic
    header has the same new #define's, so that works out fine.

    - drivers/net/tun.c

    fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
    switched over to using 'tun->socket.sk' instead of the redundantly
    available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
    to the TUN driver") which added a new 'tun->sk' use.

    Noted in 'next' by Stephen Rothwell.

    Linus Torvalds
     

10 Sep, 2009

1 commit

  • This was #define'd as 0 on all platforms, so let's get rid of it.

    This change makes pci_scan_slot() slightly easier to read.

    Cc: Yoshinori Sato
    Cc: Tony Luck
    Cc: David Howells
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Ingo Molnar
    Cc: Ivan Kokshaysky
    Reviewed-by: Matthew Wilcox
    Acked-by: Russell King
    Acked-by: Ralf Baechle
    Acked-by: Kyle McMartin
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Paul Mundt
    Acked-by: Arnd Bergmann
    Signed-off-by: Alex Chiang
    Signed-off-by: Jesse Barnes

    Alex Chiang
     

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

1 commit

  • 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
     

13 Aug, 2009

1 commit


10 Aug, 2009

1 commit


06 Aug, 2009

2 commits

  • This sockopt goes in line with SO_TYPE and SO_PROTOCOL. It makes it
    possible for userspace programs to pass around file descriptors — I
    am referring to arguments-to-functions, but it may even work for the
    fd passing over UNIX sockets — without needing to also pass the
    auxiliary information (PF_INET6/IPPROTO_TCP).

    Signed-off-by: Jan Engelhardt
    Signed-off-by: David S. Miller

    Jan Engelhardt
     
  • Similar to SO_TYPE returning the socket type, SO_PROTOCOL allows to
    retrieve the protocol used with a given socket.

    I am not quite sure why we have that-many copies of socket.h, and why
    the values are not the same on all arches either, but for where hex
    numbers dominate, I use 0x1029 for SO_PROTOCOL as that seems to be
    the next free unused number across a bunch of operating systems, or
    so Google results make me want to believe. SO_PROTOCOL for others
    just uses the next free Linux number, 38.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: David S. Miller

    Jan Engelhardt
     

28 Jul, 2009

1 commit

  • mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()

    Upcoming paches to support the new 64-bit "BookE" powerpc architecture
    will need to have the virtual address corresponding to PTE page when
    freeing it, due to the way the HW table walker works.

    Basically, the TLB can be loaded with "large" pages that cover the whole
    virtual space (well, sort-of, half of it actually) represented by a PTE
    page, and which contain an "indirect" bit indicating that this TLB entry
    RPN points to an array of PTEs from which the TLB can then create direct
    entries. Thus, in order to invalidate those when PTE pages are deleted,
    we need the virtual address to pass to tlbilx or tlbivax instructions.

    The old trick of sticking it somewhere in the PTE page struct page sucks
    too much, the address is almost readily available in all call sites and
    almost everybody implemets these as macros, so we may as well add the
    argument everywhere. I added it to the pmd and pud variants for consistency.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: David Howells [MN10300 & FRV]
    Acked-by: Nick Piggin
    Acked-by: Martin Schwidefsky [s390]
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

18 Jul, 2009

1 commit

  • The BSS section macros in vmlinux.lds.h currently place the .sbss
    input section outside the bounds of [__bss_start, __bss_end]. On all
    architectures except for microblaze that handle both .sbss and
    __bss_start/__bss_end, this is wrong: the .sbss input section is
    within the range [__bss_start, __bss_end]. Relatedly, the example
    code at the top of the file actually has __bss_start/__bss_end defined
    twice; I believe the right fix here is to define them in the
    BSS_SECTION macro but not in the BSS macro.

    Another problem with the current macros is that several
    architectures have an ALIGN(4) or some other small number just before
    __bss_stop in their linker scripts. The BSS_SECTION macro currently
    hardcodes this to 4; while it should really be an argument. It also
    ignores its sbss_align argument; fix that.

    mn10300 is the only user at present of any of the macros touched by
    this patch. It looks like mn10300 actually was incorrectly converted
    to use the new BSS() macro (the alignment of 4 prior to conversion was
    a __bss_stop alignment, but the argument to the BSS macro is a start
    alignment). So fix this as well.

    I'd like acks from Sam and David on this one. Also CCing Paul, since
    he has a patch from me which will need to be updated to use
    BSS_SECTION(0, PAGE_SIZE, 4) once this gets merged.

    Signed-off-by: Tim Abbott
    Cc: Paul Mundt
    Cc: David Howells
    Signed-off-by: Sam Ravnborg

    Tim Abbott
     

14 Jul, 2009

1 commit


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
     

11 Jul, 2009

1 commit

  • Pull the initial preempt_count value into a single
    definition site.

    Maintainers for: alpha, ia64 and m68k, please have a look,
    your arch code is funny.

    The header magic is a bit odd, but similar to the KERNEL_DS
    one, CPP waits with expanding these macros until the
    INIT_THREAD_INFO macro itself is expanded, which is in
    arch/*/kernel/init_task.c where we've already included
    sched.h so we're good.

    Cc: tony.luck@intel.com
    Cc: rth@twiddle.net
    Cc: geert@linux-m68k.org
    Signed-off-by: Peter Zijlstra
    Acked-by: Matt Mackall
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

09 Jul, 2009

2 commits

  • 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
     
  • Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
    handling of log-levels and newlines") changed printk semantics. printk
    lines with multiple KERN_ prefixes are no longer emitted as
    before the patch.

    is now included in the output on each additional use.

    Remove all uses of multiple KERN_s in formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

07 Jul, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: Fix IRQ swizzling for ARI-enabled devices
    ia64/PCI: adjust section annotation for pcibios_setup()
    x86/PCI: get root CRS before scanning children
    x86/PCI: fix boundary checking when using root CRS
    PCI MSI: Fix restoration of MSI/MSI-X mask states in suspend/resume
    PCI MSI: Unmask MSI if setup failed
    PCI MSI: shorten PCI_MSIX_ENTRY_* symbol names
    PCI: make pci_name() take const argument
    PCI: More PATA quirks for not entering D3
    PCI: fix kernel-doc warnings
    PCI: check if bus has a proper bridge device before triggering SBR
    PCI: remove pci_dac_dma_... APIs on mn10300
    PCI ECRC: Remove unnecessary semicolons
    PCI MSI: Return if alloc_msi_entry for MSI-X failed

    Linus Torvalds
     

05 Jul, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
    kbuild: finally remove the obsolete variable $TOPDIR
    gitignore: ignore scripts/ihex2fw
    Kbuild: Disable the -Wformat-security gcc flag
    gitignore: ignore gcov output files
    kbuild: deb-pkg ship changelog
    Add new __init_task_data macro to be used in arch init_task.c files.
    asm-generic/vmlinux.lds.h: shuffle INIT_TASK* macro names in vmlinux.lds.h
    Add new macros for page-aligned data and bss sections.
    asm-generic/vmlinux.lds.h: Fix up RW_DATA_SECTION definition.

    Linus Torvalds
     

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

1 commit


30 Jun, 2009

1 commit


27 Jun, 2009

1 commit

  • We recently added a INIT_TASK(align) in include/asm-generic/vmlinux.lds.h,
    but there is already a macro INIT_TASK in include/linux/init_task.h, which
    is quite confusing. We should switch the macro in the linker script to
    INIT_TASK_DATA. (Sorry that I missed this in reviewing the patch). Since
    the macros are new, there is only one user of the INIT_TASK in
    vmlinux.lds.h, arch/mn10300/kernel/vmlinux.lds.S.

    However, we are currently using INIT_TASK_DATA for laying down an entire
    .data.init_task section. So rename that to INIT_TASK_DATA_SECTION.

    I would be worried about changing the meaning of INIT_TASK_DATA, but the
    old INIT_TASK_DATA implementation had no users, and in fact if anyone had
    tried to use it, it would have failed to compile because it didn't pass
    the alignment to the old INIT_TASK.

    Signed-off-by: Tim Abbott
    Cc: David Howells
    Cc: Jesper Nilsson

    Tim Abbott