1. 25 5月, 2008 1 次提交
  2. 29 4月, 2008 1 次提交
    • R
      x86_64 vDSO: use initdata · d9dedc13
      Roland McGrath 提交于
      The 64-bit vDSO image is in a special ".vdso" section for no reason
      I can determine.  Furthermore, the location of the vdso_end symbol
      includes some wrongly-calculated padding space in the image, which
      is then (correctly) rounded to page size, resulting in an extra page
      of zeros in the image mapped in to user processes.
      
      This changes it to put the vdso.so image into normal initdata as we
      have always done for the 32-bit vDSO images.  The extra padding is
      gone, so the user VMA is one page instead of two.  The image that
      was already copied around at boot time is now in initdata, so we
      recover that wasted space after boot.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d9dedc13
  3. 17 4月, 2008 2 次提交
    • T
      x86: use ELF section to list CPU vendor specific code · 03ae5768
      Thomas Petazzoni 提交于
      Replace the hardcoded list of initialization functions for each CPU
      vendor by a list in an ELF section, which is read at initialization in
      arch/x86/kernel/cpu/cpu.c to fill the cpu_devs[] array. The ELF
      section, named .x86cpuvendor.init, is reclaimed after boot, and
      contains entries of type "struct cpu_vendor_dev" which associates a
      vendor number with a pointer to a "struct cpu_dev" structure.
      
      This first modification allows to remove all the VENDOR_init_cpu()
      functions.
      
      This patch also removes the hardcoded calls to early_init_amd() and
      early_init_intel(). Instead, we add a "c_early_init" member to the
      cpu_dev structure, which is then called if not NULL by the generic CPU
      initialization code. Unfortunately, in early_cpu_detect(), this_cpu is
      not yet set, so we have to use the cpu_devs[] array directly.
      
      This patch is part of the Linux Tiny project, and is needed for
      further patch that will allow to disable compilation of unused CPU
      support code.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      03ae5768
    • I
      x86: check vmlinux limits, 64-bit · b4e0409a
      Ingo Molnar 提交于
      these build-time and link-time checks would have prevented the
      vmlinux size regression.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b4e0409a
  4. 19 2月, 2008 2 次提交
  5. 30 1月, 2008 2 次提交
  6. 29 1月, 2008 1 次提交
  7. 11 10月, 2007 2 次提交
  8. 23 7月, 2007 1 次提交
  9. 22 7月, 2007 3 次提交
  10. 20 7月, 2007 2 次提交
    • R
      x86_64: Put allocated ELF notes in read-only data segment · 2e1d5b8f
      Roland McGrath 提交于
      This changes the x86_64 linker script to use the asm-generic NOTES macro so
      that ELF note sections with SHF_ALLOC set are linked into the kernel image
      along with other read-only data.  The PT_NOTE also points to their location.
      
      This paves the way for putting useful build-time information into ELF notes
      that can be found easily later in a kernel memory dump.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2e1d5b8f
    • F
      define new percpu interface for shared data · 5fb7dc37
      Fenghua Yu 提交于
      per cpu data section contains two types of data.  One set which is
      exclusively accessed by the local cpu and the other set which is per cpu,
      but also shared by remote cpus.  In the current kernel, these two sets are
      not clearely separated out.  This can potentially cause the same data
      cacheline shared between the two sets of data, which will result in
      unnecessary bouncing of the cacheline between cpus.
      
      One way to fix the problem is to cacheline align the remotely accessed per
      cpu data, both at the beginning and at the end.  Because of the padding at
      both ends, this will likely cause some memory wastage and also the
      interface to achieve this is not clean.
      
      This patch:
      
      Moves the remotely accessed per cpu data (which is currently marked
      as ____cacheline_aligned_in_smp) into a different section, where all the data
      elements are cacheline aligned. And as such, this differentiates the local
      only data and remotely accessed data cleanly.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      Acked-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5fb7dc37
  11. 19 5月, 2007 2 次提交
  12. 03 5月, 2007 4 次提交
    • A
      [PATCH] x86-64: Remove CONFIG_REORDER · 2136220d
      Andi Kleen 提交于
      The option never worked well and functionlist wasn't well maintained.
      Also it made the build very slow on many binutils version.
      
      So just remove it.
      
      Cc: arjan@linux.intel.com
      Signed-off-by: NAndi Kleen <ak@suse.de>
      2136220d
    • E
      [PATCH] x86-64: move __vgetcpu_mode & __jiffies to the vsyscall_2 zone · 141a892f
      Eric Dumazet 提交于
      We apparently hit the 1024 limit of vsyscall_0 zone when some debugging
      options are set, or if __vsyscall_gtod_data is 64 bytes larger.
      
      In order to save 128 bytes from the vsyscall_0 zone, we move __vgetcpu_mode
      & __jiffies to vsyscall_2 zone where they really belong, since they are
      used only from vgetcpu() (which is in this vsyscall_2 area).
      
      After patch is applied, new layout is :
      
      ffffffffff600000 T vgettimeofday
      ffffffffff60004e t vsysc2
      ffffffffff600140 t vread_hpet
      ffffffffff600150 t vread_tsc
      ffffffffff600180 D __vsyscall_gtod_data
      ffffffffff600400 T vtime
      ffffffffff600413 t vsysc1
      ffffffffff600800 T vgetcpu
      ffffffffff600870 D __vgetcpu_mode
      ffffffffff600880 D __jiffies
      ffffffffff600c00 T venosys_1
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      141a892f
    • J
      [PATCH] x86: Allow percpu variables to be page-aligned · b6e3590f
      Jeremy Fitzhardinge 提交于
      Let's allow page-alignment in general for per-cpu data (wanted by Xen, and
      Ingo suggested KVM as well).
      
      Because larger alignments can use more room, we increase the max per-cpu
      memory to 64k rather than 32k: it's getting a little tight.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      b6e3590f
    • J
      [PATCH] x86: tighten kernel image page access rights · 6fb14755
      Jan Beulich 提交于
      On x86-64, kernel memory freed after init can be entirely unmapped instead
      of just getting 'poisoned' by overwriting with a debug pattern.
      
      On i386 and x86-64 (under CONFIG_DEBUG_RODATA), kernel text and bug table
      can also be write-protected.
      
      Compared to the first version, this one prevents re-creating deleted
      mappings in the kernel image range on x86-64, if those got removed
      previously. This, together with the original changes, prevents temporarily
      having inconsistent mappings when cacheability attributes are being
      changed on such pages (e.g. from AGP code). While on i386 such duplicate
      mappings don't exist, the same change is done there, too, both for
      consistency and because checking pte_present() before using various other
      pte_XXX functions is a requirement anyway. At once, i386 code gets
      adjusted to use pte_huge() instead of open coding this.
      
      AK: split out cpa() changes
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      6fb14755
  13. 16 4月, 2007 1 次提交
    • A
      [PATCH] x86: Fix gcc 4.2 _proxy_pda workaround · 08269c6d
      Andi Kleen 提交于
      Due to an over aggressive optimizer gcc 4.2 cannot optimize away _proxy_pda
      in all cases (counter intuitive, but true).  This breaks loading of some
      modules.
      
      The earlier workaround to just export a dummy symbol didn't work unfortunately
      because the module code ignores exports with 0 value.
      
      Make it 1 instead.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      08269c6d
  14. 17 2月, 2007 1 次提交
  15. 12 2月, 2007 1 次提交
  16. 16 12月, 2006 1 次提交
    • L
      Remove stack unwinder for now · d1526e2c
      Linus Torvalds 提交于
      It has caused more problems than it ever really solved, and is
      apparently not getting cleaned up and fixed.  We can put it back when
      it's stable and isn't likely to make warning or bug events worse.
      
      In the meantime, enable frame pointers for more readable stack traces.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d1526e2c
  17. 10 12月, 2006 1 次提交
    • A
      [PATCH] x86: Work around gcc 4.2 over aggressive optimizer · 1bac3b38
      Andi Kleen 提交于
      The new PDA code uses a dummy _proxy_pda variable to describe
      memory references to the PDA. It is never referenced
      in inline assembly, but exists as input/output arguments.
      gcc 4.2 in some cases can CSE references to this which causes
      unresolved symbols.  Define it to zero to avoid this.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      1bac3b38
  18. 09 12月, 2006 1 次提交
    • J
      [PATCH] Generic BUG for x86-64 · c31a0bf3
      Jeremy Fitzhardinge 提交于
      This makes x86-64 use the generic BUG machinery.
      
      The main advantage in using the generic BUG machinery for x86-64 is that
      the inlined overhead of BUG is just the ud2a instruction; the file+line
      information are no longer inlined into the instruction stream.  This
      reduces cache pollution.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Hugh Dickens <hugh@veritas.com>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c31a0bf3
  19. 07 12月, 2006 1 次提交
  20. 21 11月, 2006 2 次提交
  21. 28 10月, 2006 1 次提交
  22. 22 10月, 2006 1 次提交
    • V
      [PATCH] x86-64: Overlapping program headers in physical addr space fix · dbaab49f
      Vivek Goyal 提交于
      o A recent change to vmlinux.ld.S file broke kexec as now resulting vmlinux
        program headers are overlapping in physical address space.
      
      o Now all the vsyscall related sections are placed after data and after
        that mostly init data sections are placed. To avoid physical overlap
        among phdrs, there are three possible solutions.
      	- Place vsyscall sections also in data phdrs instead of user
      	- move vsyscal sections after init data in bss.
      	- create another phdrs say data.init and move all the sections
      	  after vsyscall into this new phdr.
      
      o This patch implements the third solution.
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Magnus Damm <magnus@valinux.co.jp>
      Cc: Andi Kleen <ak@suse.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      dbaab49f
  23. 01 10月, 2006 1 次提交
    • A
      [PATCH] kill wall_jiffies · 8ef38609
      Atsushi Nemoto 提交于
      With 2.6.18-rc4-mm2, now wall_jiffies will always be the same as jiffies.
      So we can kill wall_jiffies completely.
      
      This is just a cleanup and logically should not change any real behavior
      except for one thing: RTC updating code in (old) ppc and xtensa use a
      condition "jiffies - wall_jiffies == 1".  This condition is never met so I
      suppose it is just a bug.  I just remove that condition only instead of
      kill the whole "if" block.
      
      [heiko.carstens@de.ibm.com: s390 build fix and cleanup]
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8ef38609
  24. 30 9月, 2006 1 次提交
    • V
      [PATCH] Re-positioning the bss segment · 120b1142
      Vivek Goyal 提交于
      [AK: This apparently broke some systems, but we need it to fix
      a compile problem with old binutils and in theory the patch
      is correct. So let's trying reenabling it again.]
      
      o Currently bss segment is being placed somewhere in the middle (after .data)
        section and after bss lots of init section and data sections are coming.
        Is it intentional?
      
      o One side affect of placing bss in the middle is that objcopy keeps the
        bss in raw binary image (vmlinux.bin) hence unnecessarily increasing
        the size of raw binary image. (In my case ~600K). It also increases
        the size of generated bzImage, though the increase is very small
        (896 bytes), probably a very high compression ratio for stream
        of zeros.
      
      o This patch moves the bss at the end hence reducing the size of
        bzImage by 896 bytes and size of vmlinux.bin by 600K.
      
      o This change benefits in the context of relocatable kernel patches. If
        kernel bss is not part of compressed data (vmlinux.bin) then it does
        not have to be decompressed and this area can be used by the decompressor
        for its execution hence keeping the memory requirements bounded and
        decompressor code does not stomp over any other data loaded beyond
        kernel image (As might be the case with bootloaders like kexec).
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      120b1142
  25. 26 9月, 2006 3 次提交
    • A
      [PATCH] Mark per cpu data initialization __initdata again · b38337a6
      Andi Kleen 提交于
      Before 2.6.16 this was changed to work around code that accessed
      CPUs not in the possible map. But that code should be all fixed now,
      so mark it __initdata again.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      b38337a6
    • I
      [PATCH] Put .note.* sections into a PT_NOTE segment · f2a9e1de
      Ian Campbell 提交于
      This patch updates x86_64 linker script to pack any .note.* sections
      into a PT_NOTE segment in the output file.
      
      To do this, we tell ld that we need a PT_NOTE segment.  This requires
      us to start explicitly mapping sections to segments, so we also need
      to explicitly create PT_LOAD segments for text and data, and map the
      sections to them appropriately.  Fortunately, each section will
      default to its previous section's segment, so it doesn't take many
      changes to vmlinux.lds.S.
      
      The corresponding change is already made for i386 in -mm and I'd like
      this patch to join it. The section to segment mappings do change as do
      the segment flags so some time in -mm would be good for that reason as
      well, just in case.
      
      In particular .data and .bss move from the text segment to the data
      segment and .data.cacheline_aligned .data.read_mostly are put in the
      data segment instead of a separate one.
      
      I think that it would be possible to exactly match the existing section
      to segment mapping and flags but it would be a more intrusive change and
      I'm not sure there is a reason for the existing layout other than it is
      what you get by default if you don't explicitly specify something else.
      If there is a reason for the existing layout then I will of course make
      the more intrusive change. If there is no reason we could probably drop
      the executable or writable flags from some segments but I don't know how
      much attention is paid to them anyway so it might not be worth the
      effort.
      
      The vsyscall related sections need to go in a different segment to the
      normal data segment and so I invented a "user" segment to contain them.
      I believe this should appear to be another data segment as far as the
      kernel is concerned so the flags are setup accordingly.
      
      The notes will be used in the Xen paravirt_ops backend to provide
      additional information to the domain builder. I am in the process of
      converting the xen-unstable kernels and tools over to this scheme at the
      moment to support this in the future.
      
      It has been suggested to me that the notes segment should have flags 0
      (i.e. not readable) since it is only used by the loader and is not used
      at runtime. For now I went with a readable segment since that is what
      the i386 patch uses.
      
      AK: dropped NOTES addition right now because the needed infrastructure
      for that is not merged yet
      Signed-off-by: NIan Campbell <ian.campbell@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      f2a9e1de
    • V
      [PATCH] Add the vgetcpu vsyscall · c08c8205
      Vojtech Pavlik 提交于
      This patch adds a vgetcpu vsyscall, which depending on the CPU RDTSCP
      capability uses either the RDTSCP or CPUID to obtain a CPU and node
      numbers and pass them to the program.
      
      AK: Lots of changes over Vojtech's original code:
      Better prototype for vgetcpu()
      It's better to pass the cpu / node numbers as separate arguments
      to avoid mistakes when going from SMP to NUMA.
      Also add a fast time stamp based cache using a user supplied
      argument to speed things more up.
      Use fast method from Chuck Ebbert to retrieve node/cpu from
      GDT limit instead of CPUID
      Made sure RDTSCP init is always executed after node is known.
      Drop printk
      Signed-off-by: NVojtech Pavlik <vojtech@suse.cz>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      c08c8205
  26. 01 7月, 2006 1 次提交