1. 27 7月, 2008 1 次提交
  2. 26 7月, 2008 1 次提交
  3. 10 7月, 2008 1 次提交
    • D
      firmware: allow firmware files to be built into kernel image · 5658c769
      David Woodhouse 提交于
      Some drivers have their own hacks to bypass the kernel's firmware loader
      and build their firmware into the kernel; this renders those unnecessary.
      
      Other drivers don't use the firmware loader at all, because they always
      want the firmware to be available. This allows them to start using the
      firmware loader.
      
      A third set of drivers already use the firmware loader, but can't be
      used without help from userspace, which sometimes requires an initrd.
      This allows them to work in a static kernel.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      5658c769
  4. 11 6月, 2008 1 次提交
    • R
      Suspend/Resume bug in PCI layer wrt quirks · e1a2a51e
      Rafael J. Wysocki 提交于
      Some quirks should be called with interrupt disabled, we can't directly
      call them in .resume_early. Also the patch introduces
      pci_fixup_resume_early and pci_fixup_suspend, which matches current
      device core callbacks (.suspend/.resume_early).
      
      TBD: Somebody knows why we need quirk resume should double check if a
      quirk should be called in resume or resume_early. I changed some per my
      understanding, but can't make sure I fixed all.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      e1a2a51e
  5. 25 5月, 2008 2 次提交
  6. 20 2月, 2008 1 次提交
    • S
      Add missing init section definitions · 37c514e3
      Sam Ravnborg 提交于
      When adding __devinitconst etc. the __initconst variant
      were missed.
      Add this one and proper definitions for .head.text for use
      in .S files.
      The naming .head.text is preferred over .text.head as the
      latter will conflict for a function named head when introducing
      -ffunctions-sections.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      37c514e3
  7. 30 1月, 2008 1 次提交
    • A
      x86: add testcases for RODATA and NX protections/attributes · edeed305
      Arjan van de Ven 提交于
      Latest update; I now have 4 NX tests, but 2 fail so they're #if 0'd.
      I also cleaned up the NX test code quite a bit, and got rid of the ugly
      exception table sorting stuff.
      
      From: Arjan van de Ven <arjan@linux.intel.com>
      
      This patch adds testcases for the CONFIG_DEBUG_RODATA configuration option
      as well as the NX CPU feature/mappings. Both testcases can move to tests/
      once that patch gets merged into mainline.
      (I'm half considering moving the rodata test into mm/init.c but I'll
      wait with that until init.c is unified)
      
      As part of this I had to fix a not-quite-right alignment in the vmlinux.lds.h
      for the RODATA sections, which lead to 1 page less being marked read only.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      edeed305
  8. 29 1月, 2008 4 次提交
    • S
      Introduce new section reference annotations tags: __ref, __refdata, __refconst · 312b1485
      Sam Ravnborg 提交于
      Today we have the following annotations for functions/data
      referencing __init/__exit functions / data:
      
      __init_refok     => for init functions
      __initdata_refok => for init data
      __exit_refok     => for exit functions
      
      There is really no difference between the __init and __exit
      versions and simplify it and to introduce a shorter annotation
      the following new annotations are introduced:
      
      __ref      => for functions (code) that
                    references __*init / __*exit
      __refdata  => for variables
      __refconst => for const variables
      
      Whit this annotation is it more obvious what the annotation
      is for and there is no longer the arbitary division
      between __init and __exit code.
      
      The mechanishm is the same as before - a special section
      is created which is made part of the usual sections
      in the linker script.
      
      We will start to see annotations like this:
      
      -static struct pci_serial_quirk pci_serial_quirks[] = {
      +static const struct pci_serial_quirk pci_serial_quirks[] __refconst = {
      -----------------
      -static struct notifier_block __cpuinitdata cpuid_class_cpu_notifier =
      +static struct notifier_block cpuid_class_cpu_notifier __refdata =
      ----------------
      -static int threshold_cpu_callback(struct notifier_block *nfb,
      +static int __ref threshold_cpu_callback(struct notifier_block *nfb,
      
      [The above is just random samples].
      
      Note: No modifications were needed in modpost
      to support the new sections due to the newly introduced
      blacklisting.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      312b1485
    • A
      asm-generic/vmlix.lds.h: simplify __mem{init,exit}* dependencies · 1a3fb6d4
      Adrian Bunk 提交于
      Simplify the dependencies on __mem{init,exit}* (ACPI_HOTPLUG_MEMORY requires
      MEMORY_HOTPLUG).
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      1a3fb6d4
    • S
      Use separate sections for __dev/__cpu/__mem code/data · eb8f6890
      Sam Ravnborg 提交于
      Introducing separate sections for __dev* (HOTPLUG),
      __cpu* (HOTPLUG_CPU) and __mem* (MEMORY_HOTPLUG)
      allows us to do a much more reliable Section mismatch
      check in modpost. We are no longer dependent on the actual
      configuration of for example HOTPLUG.
      
      This has the effect that all users see much more
      Section mismatch warnings than before because they
      were almost all hidden when HOTPLUG was enabled.
      The advantage of this is that when building a piece
      of code then it is much more likely that the Section
      mismatch errors are spotted and the warnings will be
      felt less random of nature.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Adrian Bunk <bunk@kernel.org>
      eb8f6890
    • S
      all archs: consolidate init and exit sections in vmlinux.lds.h · 01ba2bdc
      Sam Ravnborg 提交于
      This patch consolidate all definitions of .init.text, .init.data
      and .exit.text, .exit.data section definitions in
      the generic vmlinux.lds.h.
      
      This is a preparational patch - alone it does not buy
      us much good.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      01ba2bdc
  9. 20 10月, 2007 1 次提交
  10. 14 10月, 2007 1 次提交
  11. 20 7月, 2007 2 次提交
    • R
      i386: Put allocated ELF notes in read-only data segment · cbe87121
      Roland McGrath 提交于
      This changes the i386 linker script and the asm-generic macro it uses 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>
      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: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cbe87121
    • 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
  12. 30 5月, 2007 1 次提交
    • S
      sparc64: fix alignment bug in linker definition script · 4096b46f
      Sam Ravnborg 提交于
      The RO_DATA section were hardcoded to a specific
      alignment in include/asm-generic/vmlinux.h.
      But for sparc64 this did not match the PAGE_SIZE.
      
      Introduce a new section definition named:
      RO_DATA that takes actual alignment as parameter.
      RODATA are provided for backward compatibility.
      
      On top of this avoid hardcoding alignment for
      sparc64 in reset of the script
      Fix is build-tested on sparc64 + x86_64.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      4096b46f
  13. 19 5月, 2007 3 次提交
  14. 03 5月, 2007 1 次提交
  15. 21 12月, 2006 1 次提交
    • A
      PCI: Fix multiple problems with VIA hardware · 1597cacb
      Alan Cox 提交于
      This patch is designed to fix:
      - Disk eating corruptor on KT7 after resume from RAM
      - VIA IRQ handling
      - VIA fixups for bus lockups after resume from RAM
      
      The core of this is to add a table of resume fixups run at resume time.
      We need to do this for a variety of boards and features, but particularly
      we need to do this to get various critical VIA fixups done on resume.
      
      The second part of the problem is to handle VIA IRQ number rules which
      are a bit odd and need special handling for PIC interrupts. Various
      patches broke various boxes and while this one may not be perfect
      (hopefully it is) it ensures the workaround is applied to the right
      devices only.
      
      From: Jean Delvare <khali@linux-fr.org>
      
      Now that PCI quirks are replayed on software resume, we can safely
      re-enable the Asus SMBus unhiding quirk even when software suspend support
      is enabled.
      
      [akpm@osdl.org: fix const warning]
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Cc: Jean Delvare <khali@linux-fr.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1597cacb
  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. 12 12月, 2006 1 次提交
  18. 09 12月, 2006 1 次提交
    • J
      [PATCH] Generic BUG implementation · 7664c5a1
      Jeremy Fitzhardinge 提交于
      This patch adds common handling for kernel BUGs, for use by architectures as
      they wish.  The code is derived from arch/powerpc.
      
      The advantages of having common BUG handling are:
       - consistent BUG reporting across architectures
       - shared implementation of out-of-line file/line data
       - implement CONFIG_DEBUG_BUGVERBOSE consistently
      
      This means that in inline impact of BUG is just the illegal instruction
      itself, which is an improvement for i386 and x86-64.
      
      A BUG is represented in the instruction stream as an illegal instruction,
      which has file/line information associated with it.  This extra information is
      stored in the __bug_table section in the ELF file.
      
      When the kernel gets an illegal instruction, it first confirms it might
      possibly be from a BUG (ie, in kernel mode, the right illegal instruction).
      It then calls report_bug().  This searches __bug_table for a matching
      instruction pointer, and if found, prints the corresponding file/line
      information.  If report_bug() determines that it wasn't a BUG which caused the
      trap, it returns BUG_TRAP_TYPE_NONE.
      
      Some architectures (powerpc) implement WARN using the same mechanism; if the
      illegal instruction was the result of a WARN, then report_bug(Q) returns
      CONFIG_DEBUG_BUGVERBOSE; otherwise it returns BUG_TRAP_TYPE_BUG.
      
      lib/bug.c keeps a list of loaded modules which can be searched for __bug_table
      entries.  The architecture must call
      module_bug_finalize()/module_bug_cleanup() from its corresponding
      module_finalize/cleanup functions.
      
      Unsetting CONFIG_DEBUG_BUGVERBOSE will reduce the kernel size by some amount.
      At the very least, filename and line information will not be recorded for each
      but, but architectures may decide to store no extra information per BUG at
      all.
      
      Unfortunately, gcc doesn't have a general way to mark an asm() as noreturn, so
      architectures will generally have to include an infinite loop (or similar) in
      the BUG code, so that gcc knows execution won't continue beyond that point.
      gcc does have a __builtin_trap() operator which may be useful to achieve the
      same effect, unfortunately it cannot be used to actually implement the BUG
      itself, because there's no way to get the instruction's address for use in
      generating the __bug_table entry.
      
      [randy.dunlap@oracle.com: Handle BUG=n, GENERIC_BUG=n to prevent build errors]
      [bunk@stusta.de: include/linux/bug.h must always #include <linux/module.h]
      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: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7664c5a1
  19. 07 12月, 2006 2 次提交
    • J
      [PATCH] unwinder: move .eh_frame to RODATA · b65780e1
      Jan Beulich 提交于
      The .eh_frame section contents is never written to, so it can as well
      benefit from CONFIG_DEBUG_RODATA.
      
      Diff-ed against firstfloor tree.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      b65780e1
    • V
      [PATCH] i386: Distinguish absolute symbols · 6569580d
      Vivek Goyal 提交于
      Ld knows about 2 kinds of symbols,  absolute and section
      relative.  Section relative symbols symbols change value
      when a section is moved and absolute symbols do not.
      
      Currently in the linker script we have several labels
      marking the beginning and ending of sections that
      are outside of sections, making them absolute symbols.
      Having a mixture of absolute and section relative
      symbols refereing to the same data is currently harmless
      but it is confusing.
      
      This must be done carefully as newer revs of ld do not place
      symbols that appear in sections without data and instead
      ld makes those symbols global :(
      
      My ultimate goal is to build a relocatable kernel.  The
      safest and least intrusive technique is to generate
      relocation entries so the kernel can be relocated at load
      time.  The only penalty would be an increase in the size
      of the kernel binary.  The problem is that if absolute and
      relocatable symbols are not properly specified absolute symbols
      will be relocated or section relative symbols won't be, which
      is fatal.
      
      The practical motivation is that when generating kernels that
      will run from a reserved area for analyzing what caused
      a kernel panic, it is simpler if you don't need to hard code
      the physical memory location they will run at, especially
      for the distributions.
      
      [AK: and merged:]
      
      o Also put a message so that in future people can be aware of it and
        avoid introducing absolute symbols.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      6569580d
  20. 21 11月, 2006 1 次提交
    • L
      Add "pure_initcall" for static variable initialization · b3438f82
      Linus Torvalds 提交于
      This is a quick hack to overcome the fact that SRCU currently does not
      allow static initializers, and we need to sometimes initialize those
      things before any other initializers (even "core" ones) can do so.
      
      Currently we don't allow this at all for modules, and the only user that
      needs is right now is cpufreq. As reported by Thomas Gleixner:
      
         "Commit b4dfdbb3 ("[PATCH] cpufreq:
          make the transition_notifier chain use SRCU breaks cpu frequency
          notification users, which register the callback > on core_init
          level."
      
      Cc: Thomas Gleixner <tglx@timesys.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Andrew Morton <akpm@osdl.org>,
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b3438f82
  21. 28 10月, 2006 2 次提交
  22. 22 10月, 2006 1 次提交
    • J
      [PATCH] x86-64: Speed up dwarf2 unwinder · 690a973f
      Jan Beulich 提交于
      This changes the dwarf2 unwinder to do a binary search for CIEs
      instead of a linear work. The linker is unfortunately not
      able to build a proper lookup table at link time, instead it creates
      one at runtime as soon as the bootmem allocator is usable (so you'll continue
      using the linear lookup for the first [hopefully] few calls).
      The code should be ready to utilize a build-time created table once
      a fixed linker becomes available.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      690a973f
  23. 27 9月, 2006 1 次提交
  24. 26 9月, 2006 1 次提交
    • J
      [PATCH] x86: put .note.* sections into a PT_NOTE segment in vmlinux · 9c9b8b38
      Jeremy Fitzhardinge 提交于
      This patch will pack any .note.* section 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.
      
      This only changes i386 for now, but I presume the corresponding changes for
      other architectures will be as simple.
      
      This change also adds <linux/elfnote.h>, which defines C and Assembler macros
      for actually creating ELF notes.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Hollis Blanchard <hollisb@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9c9b8b38
  25. 29 6月, 2006 1 次提交
  26. 21 3月, 2006 1 次提交
  27. 07 1月, 2006 1 次提交
  28. 07 11月, 2005 1 次提交
  29. 11 9月, 2005 1 次提交
    • P
      [PATCH] i386 / uml: add dwarf sections to static link script · a7d0c210
      Paolo 'Blaisorblade' Giarrusso 提交于
      Inside the linker script, insert the code for DWARF debug info sections. This
      may help GDB'ing a Uml binary. Actually, it seems that ld is able to guess
      what I added correctly, but normal linker scripts include this section so it
      should be correct anyway adding it.
      
      On request by Sam Ravnborg <sam@ravnborg.org>, I've added it to
      asm-generic/vmlinux.lds.s. I've also moved there the stabs debug section,
      used the new macro in i386 linker script and added DWARF debug section to
      that.
      
      In the truth, I've not been able to verify the difference in GDB behaviour
      after this change (I've seen large improvements with another patch). This
      may depend on my binutils version, older one may have worse defaults.
      
      However, this section is present in normal linker script, so add it at
      least for the sake of cleanness.
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a7d0c210
  30. 08 9月, 2005 1 次提交
    • P
      [PATCH] Kprobes: prevent possible race conditions generic · d0aaff97
      Prasanna S Panchamukhi 提交于
      There are possible race conditions if probes are placed on routines within the
      kprobes files and routines used by the kprobes.  For example if you put probe
      on get_kprobe() routines, the system can hang while inserting probes on any
      routine such as do_fork().  Because while inserting probes on do_fork(),
      register_kprobes() routine grabs the kprobes spin lock and executes
      get_kprobe() routine and to handle probe of get_kprobe(), kprobes_handler()
      gets executed and tries to grab kprobes spin lock, and spins forever.  This
      patch avoids such possible race conditions by preventing probes on routines
      within the kprobes file and routines used by kprobes.
      
      I have modified the patches as per Andi Kleen's suggestion to move kprobes
      routines and other routines used by kprobes to a seperate section
      .kprobes.text.
      
      Also moved page fault and exception handlers, general protection fault to
      .kprobes.text section.
      
      These patches have been tested on i386, x86_64 and ppc64 architectures, also
      compiled on ia64 and sparc64 architectures.
      Signed-off-by: NPrasanna S Panchamukhi <prasanna@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d0aaff97
  31. 15 7月, 2005 1 次提交
    • S
      kbuild: Avoid inconsistent kallsyms data · 6d30e3a8
      Sam Ravnborg 提交于
      Several reports on inconsistent kallsyms data has been caused by the aliased symbols
      __sched_text_start and __down to shift places in the output of nm.
      The root cause was that on second pass ld aligned __sched_text_start to a 4 byte boundary
      which is the function alignment on i386.
      sched.text and spinlock.text is now aligned to an 8 byte boundary to make sure they
      are aligned to a function alignemnt on most (all?) archs.
      
      Tested by: Paulo Marques <pmarques@grupopie.com>
      Tested by: Alexander Stohr <Alexander.Stohr@gmx.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      6d30e3a8