03 Apr, 2012

1 commit


25 Mar, 2011

1 commit

  • Percpu allocator honors alignment request upto PAGE_SIZE and both the
    percpu addresses in the percpu address space and the translated kernel
    addresses should be aligned accordingly. The calculation of the
    former depends on the alignment of percpu output section in the kernel
    image.

    The linker script macros PERCPU_VADDR() and PERCPU() are used to
    define this output section and the latter takes @align parameter.
    Several architectures are using @align smaller than PAGE_SIZE breaking
    percpu memory alignment.

    This patch removes @align parameter from PERCPU(), renames it to
    PERCPU_SECTION() and makes it always align to PAGE_SIZE. While at it,
    add PCPU_SETUP_BUG_ON() checks such that alignment problems are
    reliably detected and remove percpu alignment comment recently added
    in workqueue.c as the condition would trigger BUG way before reaching
    there.

    For um, this patch raises the alignment of percpu area. As the area
    is in .init, there shouldn't be any noticeable difference.

    This problem was discovered by David Howells while debugging boot
    failure on mn10300.

    Signed-off-by: Tejun Heo
    Acked-by: Mike Frysinger
    Cc: uclinux-dist-devel@blackfin.uclinux.org
    Cc: David Howells
    Cc: Jeff Dike
    Cc: user-mode-linux-devel@lists.sourceforge.net

    Tejun Heo
     

16 Mar, 2011

1 commit

  • * 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu, x86: Add arch-specific this_cpu_cmpxchg_double() support
    percpu: Generic support for this_cpu_cmpxchg_double()
    alpha: use L1_CACHE_BYTES for cacheline size in the linker script
    percpu: align percpu readmostly subsection to cacheline

    Fix up trivial conflict in arch/x86/kernel/vmlinux.lds.S due to the
    percpu alignment having changed ("x86: Reduce back the alignment of the
    per-CPU data section")

    Linus Torvalds
     

24 Feb, 2011

1 commit


25 Jan, 2011

1 commit

  • Currently percpu readmostly subsection may share cachelines with other
    percpu subsections which may result in unnecessary cacheline bounce
    and performance degradation.

    This patch adds @cacheline parameter to PERCPU() and PERCPU_VADDR()
    linker macros, makes each arch linker scripts specify its cacheline
    size and use it to align percpu subsections.

    This is based on Shaohua's x86 only patch.

    Signed-off-by: Tejun Heo
    Cc: Shaohua Li

    Tejun Heo
     

05 Aug, 2010

1 commit


04 Aug, 2010

2 commits


12 Dec, 2009

1 commit


25 Sep, 2009

1 commit


23 Sep, 2009

1 commit


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
     

24 Jun, 2009

1 commit

  • x86 throws away .discard section but no other archs do. Also,
    .discard is not thrown away while linking modules. Make every arch
    and module linking throw it away. This will be used to define dummy
    variables for percpu declarations and definitions.

    This patch is based on Ivan Kokshaysky's alpha percpu patch.

    [ Impact: always throw away everything in .discard ]

    Signed-off-by: Tejun Heo
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: Russell King
    Cc: Haavard Skinnemoen
    Cc: Bryan Wu
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Tony Luck
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Jeff Dike
    Cc: Chris Zankel
    Cc: Rusty Russell
    Cc: Ingo Molnar

    Tejun Heo
     

01 Nov, 2008

1 commit

  • Remove the links to architecture and machine dependent directories
    (boot, lib, drivers, arch, mach)

    The links were created and used mostly from the arch/cris/Makefile,
    so why not dispense with them altogether?
    Changed $(ARCH) to "cris" in Makefile, it is easier to read this way.

    The CRISv32 head.S common files for the kernel and compressed images
    needed to be modified to use ifdefs instead of using the now removed
    mach link. Since there are only two versions, this is not a huge loss
    in readability.

    The link to vmlinux.lds.S is also replaced with a merged version
    which uses ifdefs to select the correct layout.
    System.map before and after are identical.

    Signed-off-by: Jesper Nilsson
    Acked-by: Sam Ravnborg

    Jesper Nilsson