1. 11 7月, 2009 1 次提交
  2. 10 7月, 2009 2 次提交
    • J
      memory barrier: adding smp_mb__after_lock · ad462769
      Jiri Olsa 提交于
      Adding smp_mb__after_lock define to be used as a smp_mb call after
      a lock.
      
      Making it nop for x86, since {read|write|spin}_lock() on x86 are
      full memory barriers.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad462769
    • J
      net: adding memory barrier to the poll and receive callbacks · a57de0b4
      Jiri Olsa 提交于
      Adding memory barrier after the poll_wait function, paired with
      receive callbacks. Adding fuctions sock_poll_wait and sk_has_sleeper
      to wrap the memory barrier.
      
      Without the memory barrier, following race can happen.
      The race fires, when following code paths meet, and the tp->rcv_nxt
      and __add_wait_queue updates stay in CPU caches.
      
      CPU1                         CPU2
      
      sys_select                   receive packet
        ...                        ...
        __add_wait_queue           update tp->rcv_nxt
        ...                        ...
        tp->rcv_nxt check          sock_def_readable
        ...                        {
        schedule                      ...
                                      if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
                                              wake_up_interruptible(sk->sk_sleep)
                                      ...
                                   }
      
      If there was no cache the code would work ok, since the wait_queue and
      rcv_nxt are opposit to each other.
      
      Meaning that once tp->rcv_nxt is updated by CPU2, the CPU1 either already
      passed the tp->rcv_nxt check and sleeps, or will get the new value for
      tp->rcv_nxt and will return with new data mask.
      In both cases the process (CPU1) is being added to the wait queue, so the
      waitqueue_active (CPU2) call cannot miss and will wake up CPU1.
      
      The bad case is when the __add_wait_queue changes done by CPU1 stay in its
      cache, and so does the tp->rcv_nxt update on CPU2 side.  The CPU1 will then
      endup calling schedule and sleep forever if there are no more data on the
      socket.
      
      Calls to poll_wait in following modules were ommited:
      	net/bluetooth/af_bluetooth.c
      	net/irda/af_irda.c
      	net/irda/irnet/irnet_ppp.c
      	net/mac80211/rc80211_pid_debugfs.c
      	net/phonet/socket.c
      	net/rds/af_rds.c
      	net/rfkill/core.c
      	net/sunrpc/cache.c
      	net/sunrpc/rpc_pipe.c
      	net/tipc/socket.c
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a57de0b4
  3. 09 7月, 2009 3 次提交
  4. 07 7月, 2009 2 次提交
    • T
      linux/sysrq.h needs linux/errno.h · 82e3310a
      Tobias Doerffel 提交于
      In include/linux/sysrq.h the constant EINVAL is being used but is undefined
      if include/linux/errno.h is not included before.
      
      Fix this by adding #include <linux/errno.h> at the beginning.
      Signed-off-by: NTobias Doerffel <tobias.doerffel@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      82e3310a
    • H
      elf: fix multithreaded program core dumping on arm · a65e7bfc
      Hui Zhu 提交于
      Fix the multithread program core thread message error.
      
      This issue affects arches with neither has CORE_DUMP_USE_REGSET nor
      ELF_CORE_COPY_TASK_REGS, ARM is one of them.
      
      The thread message of core file is generated in elf_dump_thread_status.
      The register values is set by elf_core_copy_task_regs in this function.
      
      If an arch doesn't define ELF_CORE_COPY_TASK_REGS,
      elf_core_copy_task_regs() will do nothing.  Then the core file will not
      have the register message of thread.
      
      So add elf_core_copy_regs to set regiser values if ELF_CORE_COPY_TASK_REGS
      doesn't define.
      
      The following is how to reproduce this issue:
      
      cat 1.c
      #include <stdio.h>
      #include <pthread.h>
      #include <assert.h>
      
      void td1(void * i)
      {
             while (1)
             {
                     printf ("1\n");
                     sleep (1);
             }
      
             return;
      }
      
      void td2(void * i)
      {
             while (1)
             {
                     printf ("2\n");
                     sleep (1);
             }
      
             return;
      }
      
      int
      main(int argc,char *argv[],char *envp[])
      {
             pthread_t       t1,t2;
      
             pthread_create(&t1, NULL, (void*)td1, NULL);
             pthread_create(&t2, NULL, (void*)td2, NULL);
      
             sleep (10);
      
             assert(0);
      
             return (0);
      }
      arm-xxx-gcc -g -lpthread 1.c -o 1
      copy 1.c and 1 to a arm board.
      Goto this board.
      ulimit -c 1800000
      ./1
      # ./1
      1
      2
      1
      ...
      ...
      1
      1: 1.c:37: main: Assertion `0' failed.
      Aborted (core dumped)
      Then you can get a core file.
      gdb 1 core.xxx
      Without the patch:
      (gdb) info threads
       3 process 909  0x00000000 in ?? ()
       2 process 908  0x00000000 in ?? ()
      * 1 process 907  0x4a6e2238 in raise () from /lib/libc.so.6
      You can found that the pc of 909 and 908 is 0x00000000.
      With the patch:
      (gdb) info threads
       3 process 885  0x4a749974 in nanosleep () from /lib/libc.so.6
       2 process 884  0x4a749974 in nanosleep () from /lib/libc.so.6
      * 1 process 883  0x4a6e2238 in raise () from /lib/libc.so.6
      The pc of 885 and 884 is right.
      Signed-off-by: NHui Zhu <teawater@gmail.com>
      Cc: Amerigo Wang <xiyou.wangcong@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Jakub Jelinek <jakub@redhat.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a65e7bfc
  5. 06 7月, 2009 2 次提交
  6. 03 7月, 2009 1 次提交
  7. 01 7月, 2009 13 次提交
    • J
      block: get rid of queue-private command filter · 018e0446
      Jens Axboe 提交于
      The initial patches to support this through sysfs export were broken
      and have been if 0'ed out in any release. So lets just kill the code
      and reclaim some space in struct request_queue, if anyone would later
      like to fixup the sysfs bits, the git history can easily restore
      the removed bits.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      018e0446
    • M
      block: Create bip slabs with embedded integrity vectors · 7878cba9
      Martin K. Petersen 提交于
      This patch restores stacking ability to the block layer integrity
      infrastructure by creating a set of dedicated bip slabs.  Each bip slab
      has an embedded bio_vec array at the end.  This cuts down on memory
      allocations and also simplifies the code compared to the original bvec
      version.  Only the largest bip slab is backed by a mempool.  The pool is
      contained in the bio_set so stacking drivers can ensure forward
      progress.
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NJens Axboe <axboe@carl.(none)>
      7878cba9
    • H
      usbnet: Remove private stats structure · d9d62f3f
      Herbert Xu 提交于
      Now that nothing uses the private stats structure we can remove it.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9d62f3f
    • K
      fbdev: add mutex for fb_mmap locking · 537a1bf0
      Krzysztof Helt 提交于
      Add a mutex to avoid a circular locking problem between the mm layer
      semaphore and fbdev ioctl mutex through the fb_mmap() call.
      
      Also, add mutex to all places where smem_start and smem_len fields change
      so the mutex inside the fb_mmap() is actually used.  Changing of these
      fields before calling the framebuffer_register() are not mutexed.
      
      This is 2.6.31 material.  It removes one lockdep (fb_mmap() and
      register_framebuffer()) but there is still another one (fb_release() and
      register_framebuffer()).  It also cleans up handling of the smem_start and
      smem_len fields used by mutexed section of the fb_mmap().
      Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      537a1bf0
    • D
      spi: add spi_master flag word · 70d6027f
      David Brownell 提交于
      Add a new spi_master.flags word listing constraints relevant to that
      controller.  Define the first constraint bit: a half duplex restriction.
      Include that constraint in the OMAP1 MicroWire controller driver.
      
      Have the mmc_spi host be the first customer of this flag.  Its coding
      relies heavily on full duplex transfers, so it must fail when the
      underlying controller driver won't perform them.
      
      (The spi_write_then_read routine could use it too: use the
      temporarily-withdrawn full-duplex speedup unless this flag is set, in
      which case the existing code applies.  Similarly, any spi_master
      implementing only SPI_3WIRE should set the flag.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      70d6027f
    • D
      spi: new spi->mode bits · b55f627f
      David Brownell 提交于
      Add two new spi_device.mode bits to accomodate more protocol options, and
      pass them through to usermode drivers:
      
       * SPI_NO_CS ... a second 3-wire variant, where the chipselect
         line is removed instead of a data line; transfers are still
         full duplex.
      
         This obviously has STRONG protocol implications since the
         chipselect transitions can't be used to synchronize state
         transitions with the SPI master.
      
       * SPI_READY ... defines open drain signal that's pulled low
         to pause the clock.  This defines a 5-wire variant (normal
         4-wire SPI plus READY) and two 4-wire variants (READY plus
         each of the 3-wire flavors).
      
         Such hardware flow control can be a big win.  There are ADC
         converters and flash chips that expose READY signals, but not
         many host controllers support it today.
      
      The spi_bitbang code should be changed to use SPI_NO_CS instead of its
      current nonportable hack.  That's a mode most hardware can easily support
      (unlike SPI_READY).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: "Paulraj, Sandeep" <s-paulraj@ti.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b55f627f
    • K
      elf: limit max map count to safe value · 341c87bf
      KAMEZAWA Hiroyuki 提交于
      With ELF, at generating coredump, some more headers other than used
      vmas are added.
      
      When max_map_count == 65536, a core generated by following kinds of
      code can be unreadable because the number of ELF's program header is
      written in 16bit in Ehdr (please see elf.h) and the number overflows.
      
      ==
      	... = mmap(); (munmap, mprotect, etc...)
      	if (failed)
      		abort();
      ==
      
      This can happen in mmap/munmap/mprotect/etc...which calls split_vma().
      
      I think 65536 is not safe as _default_ and reduce it to 65530 is good
      for avoiding unexpected corrupted core.
      
      Anyway, max_map_count can be enlarged by sysctl if a user is brave..
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
      Cc: Jakub Jelinek <jakub@redhat.com>
      Acked-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      341c87bf
    • M
      parport/serial: add support for NetMos 9901 Multi-IO card · c4285b47
      Michael Buesch 提交于
      Add support for the PCI-Express NetMos 9901 Multi-IO card.
      
      0001:06:00.0 Serial controller [0700]: NetMos Technology Device [9710:9901] (prog-if 02 [16550])
              Subsystem: Device [a000:1000]
              Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
              Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
              Latency: 0, Cache Line Size: 64 bytes
              Interrupt: pin A routed to IRQ 65
              Region 0: I/O ports at 0030 [size=8]
              Region 1: Memory at 80105000 (32-bit, non-prefetchable) [size=4K]
              Region 4: Memory at 80104000 (32-bit, non-prefetchable) [size=4K]
              Capabilities: <access denied>
              Kernel driver in use: serial
              Kernel modules: 8250_pci
      
      0001:06:00.1 Serial controller [0700]: NetMos Technology Device [9710:9901] (prog-if 02 [16550])
              Subsystem: Device [a000:1000]
              Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
              Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
              Latency: 0, Cache Line Size: 64 bytes
              Interrupt: pin B routed to IRQ 65
              Region 0: I/O ports at 0020 [size=8]
              Region 1: Memory at 80103000 (32-bit, non-prefetchable) [size=4K]
              Region 4: Memory at 80102000 (32-bit, non-prefetchable) [size=4K]
              Capabilities: <access denied>
              Kernel driver in use: serial
              Kernel modules: 8250_pci
      
      0001:06:00.2 Parallel controller [0701]: NetMos Technology Device [9710:9901] (prog-if 03 [IEEE1284])
              Subsystem: Device [a000:2000]
              Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
              Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
              Latency: 0, Cache Line Size: 64 bytes
              Interrupt: pin C routed to IRQ 65
              Region 0: I/O ports at 0010 [size=8]
              Region 1: I/O ports at <unassigned>
              Region 2: Memory at 80101000 (32-bit, non-prefetchable) [size=4K]
              Region 4: Memory at 80100000 (32-bit, non-prefetchable) [size=4K]
              Capabilities: <access denied>
              Kernel driver in use: parport_pc
              Kernel modules: parport_pc
      
      [   16.760181] PCI parallel port detected: 416c:0100, I/O at 0x812010(0x0), IRQ 65
      [   16.760225] parport0: PC-style at 0x812010, irq 65 [PCSPP,TRISTATE,EPP]
      [   16.851842] serial 0001:06:00.0: enabling device (0004 -> 0007)
      [   16.883776] 0001:06:00.0: ttyS0 at I/O 0x812030 (irq = 65) is a ST16650V2
      [   16.893832] serial 0001:06:00.1: enabling device (0004 -> 0007)
      [   16.926537] 0001:06:00.1: ttyS1 at I/O 0x812020 (irq = 65) is a ST16650V2
      Signed-off-by: NMichael Buesch <mb@bu3sch.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c4285b47
    • T
      alpha: fix percpu build breakage · b01e8dc3
      Tejun Heo 提交于
      alpha percpu access requires custom SHIFT_PERCPU_PTR() definition for
      modules to work around addressing range limitation.  This is done via
      generating inline assembly using C preprocessing which forces the
      assembler to generate external reference.  This happens behind the
      compiler's back and makes the compiler think that static percpu variables
      in modules are unused.
      
      This used to be worked around by using __unused attribute for percpu
      variables which prevent the compiler from omitting the variable; however,
      recent declare/definition attribute unification change broke this as
      __used can't be used for declaration.  Also, in the process,
      PER_CPU_ATTRIBUTES definition in alpha percpu.h got broken.
      
      This patch adds PER_CPU_DEF_ATTRIBUTES which is only used for definitions
      and make alpha use it to add __used for percpu variables in modules.  This
      also fixes the PER_CPU_ATTRIBUTES double definition bug.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Tested-by: Nmaximilian attems <max@stro.at>
      Acked-by: NIvan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b01e8dc3
    • H
      gcov: fix __ctors_start alignment · 2a2325e6
      Heiko Carstens 提交于
      The ctors section for each object file is eight byte aligned (on 64 bit).
      However the __ctors_start symbol starts at an arbitrary address dependent
      on the size of the previous sections.
      
      Therefore the linker may add some zeroes after __ctors_start to make sure
      the ctors contents are properly aligned.  However the extra zeroes at the
      beginning aren't expected by the code.  When walking the functions
      pointers contained in there and extra zeroes are added this may result in
      random jumps.  So make sure that the __ctors_start symbol is always
      aligned as well.
      
      Fixes this crash on an allyesconfig on s390:
      
      [    0.582482] Kernel BUG at 0000000000000012 [verbose debug info unavailable]
      [    0.582489] illegal operation: 0001 [#1] SMP DEBUG_PAGEALLOC
      [    0.582496] Modules linked in:
      [    0.582501] CPU: 0 Tainted: G        W  2.6.31-rc1-dirty #273
      [    0.582506] Process swapper (pid: 1, task: 000000003f218000, ksp: 000000003f2238e8)
      [    0.582510] Krnl PSW : 0704200180000000 0000000000000012 (0x12)
      [    0.582518]            R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
      [    0.582524] Krnl GPRS: 0000000000036727 0000000000000010 0000000000000001 0000000000000001
      [    0.582529]            00000000001dfefa 0000000000000000 0000000000000000 0000000000000040
      [    0.582534]            0000000001fff0f0 0000000001790628 0000000002296048 0000000002296048
      [    0.582540]            00000000020c438e 0000000001786000 0000000002014a66 000000003f223e60
      [    0.582553] Krnl Code:>0000000000000012: 0000                unknown
      [    0.582559]            0000000000000014: 0000                unknown
      [    0.582564]            0000000000000016: 0000                unknown
      [    0.582570]            0000000000000018: 0000                unknown
      [    0.582575]            000000000000001a: 0000                unknown
      [    0.582580]            000000000000001c: 0000                unknown
      [    0.582585]            000000000000001e: 0000                unknown
      [    0.582591]            0000000000000020: 0000                unknown
      [    0.582596] Call Trace:
      [    0.582599] ([<0000000002014a46>] kernel_init+0x622/0x7a0)
      [    0.582607]  [<0000000000113e22>] kernel_thread_starter+0x6/0xc
      [    0.582615]  [<0000000000113e1c>] kernel_thread_starter+0x0/0xc
      [    0.582621] INFO: lockdep is turned off.
      [    0.582624] Last Breaking-Event-Address:
      [    0.582627]  [<0000000002014a64>] kernel_init+0x640/0x7a0
      
      Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2a2325e6
    • D
      eventfd: revised interface and cleanups · 13389010
      Davide Libenzi 提交于
      Change the eventfd interface to de-couple the eventfd memory context, from
      the file pointer instance.
      
      Without such change, there is no clean way to racely free handle the
      POLLHUP event sent when the last instance of the file* goes away.  Also,
      now the internal eventfd APIs are using the eventfd context instead of the
      file*.
      
      This patch is required by KVM's IRQfd code, which is still under
      development.
      Signed-off-by: NDavide Libenzi <davidel@xmailserver.org>
      Cc: Gregory Haskins <ghaskins@novell.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Benjamin LaHaise <bcrl@kvack.org>
      Cc: Avi Kivity <avi@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      13389010
    • J
      fuse: invalidation reverse calls · 3b463ae0
      John Muir 提交于
      Add notification messages that allow the filesystem to invalidate VFS
      caches.
      
      Two notifications are added:
      
       1) inode invalidation
      
         - invalidate cached attributes
         - invalidate a range of pages in the page cache (this is optional)
      
       2) dentry invalidation
      
         - try to invalidate a subtree in the dentry cache
      
      Care must be taken while accessing the 'struct super_block' for the
      mount, as it can go away while an invalidation is in progress.  To
      prevent this, introduce a rw-semaphore, that is taken for read during
      the invalidation and taken for write in the ->kill_sb callback.
      
      Cc: Csaba Henk <csaba@gluster.com>
      Cc: Anand Avati <avati@zresearch.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      3b463ae0
    • M
      fuse: allow umask processing in userspace · e0a43ddc
      Miklos Szeredi 提交于
      This patch lets filesystems handle masking the file mode on creation.
      This is needed if filesystem is using ACLs.
      
       - The CREATE, MKDIR and MKNOD requests are extended with a "umask"
         parameter.
      
       - A new FUSE_DONT_MASK flag is added to the INIT request/reply.  With
         this the filesystem may request that the create mode is not masked.
      
      CC: Jean-Pierre André <jean-pierre.andre@wanadoo.fr>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      e0a43ddc
  8. 30 6月, 2009 3 次提交
  9. 29 6月, 2009 6 次提交
  10. 28 6月, 2009 1 次提交
  11. 27 6月, 2009 4 次提交
    • T
      Add new __init_task_data macro to be used in arch init_task.c files. · 857eceeb
      Tim Abbott 提交于
      This patch is preparation for replacing most ".data.init_task" in the
      kernel with macros, so that the section name can later be changed
      without having to touch a lot of the kernel.
      
      The long-term goal here is to be able to change the kernel's magic
      section names to those that are compatible with -ffunction-sections
      -fdata-sections.  This requires renaming all magic sections with names
      of the form ".data.foo".
      Signed-off-by: NTim Abbott <tabbott@ksplice.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      857eceeb
    • T
      asm-generic/vmlinux.lds.h: shuffle INIT_TASK* macro names in vmlinux.lds.h · 39a449d9
      Tim Abbott 提交于
      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: NTim Abbott <tabbott@ksplice.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jesper Nilsson <Jesper.Nilsson@axis.com
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      39a449d9
    • T
      Add new macros for page-aligned data and bss sections. · d2af12ae
      Tim Abbott 提交于
      This patch is preparation for replacing most uses of
      ".bss.page_aligned" and ".data.page_aligned" in the kernel with
      macros, so that the section name can later be changed without having
      to touch a lot of the kernel.
      
      The long-term goal here is to be able to change the kernel's magic
      section names to those that are compatible with -ffunction-sections
      -fdata-sections.  This requires renaming all magic sections with names
      of the form ".data.foo".
      Signed-off-by: NTim Abbott <tabbott@ksplice.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      d2af12ae
    • P
      asm-generic/vmlinux.lds.h: Fix up RW_DATA_SECTION definition. · 73f1d939
      Paul Mundt 提交于
      RW_DATA_SECTION is defined to take 4 different alignment parameters,
      while NOSAVE_DATA currently uses a fixed PAGE_SIZE alignment as noted
      in the comments.
      
      There are presently no in-tree users of this at present, and I just
      stumbled across this while implementing the simplified script on a new
      architecture port, which subsequently resulted in a syntax error.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      73f1d939
  12. 26 6月, 2009 2 次提交