1. 26 11月, 2013 4 次提交
  2. 15 11月, 2013 1 次提交
  3. 14 11月, 2013 3 次提交
    • T
      preempt: Make PREEMPT_ACTIVE generic · 00d1a39e
      Thomas Gleixner 提交于
      No point in having this bit defined by architecture.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20130917183629.090698799@linutronix.de
      00d1a39e
    • T
      hardirq: Make hardirq bits generic · 54197e43
      Thomas Gleixner 提交于
      There is no reason for per arch hardirq bits. Make them all generic
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20130917183628.534494408@linutronix.de
      54197e43
    • T
      m68k: Simplify low level interrupt handling code · 09f90f66
      Thomas Gleixner 提交于
      The low level interrupt entry code of m68k contains the following:
      
          add_preempt_count(HARDIRQ_OFFSET);
      
          do_IRQ();
      	irq_enter();
      	    add_preempt_count(HARDIRQ_OFFSET);
      	handle_interrupt();    
      	irq_exit();    
      	    sub_preempt_count(HARDIRQ_OFFSET);
      	    if (in_interrupt())
             	       return; <---- On m68k always taken!
      	    if (local_softirq_pending())
             	       do_softirq();
      
          sub_preempt_count(HARDIRQ_OFFSET);
          if (in_hardirq())
             return;
          if (status_on_stack_has_interrupt_priority_mask > 0)
             return;
          if (local_softirq_pending())
             do_softirq();
      
          ret_from_exception:
      	if (interrupted_context_is_kernel)
      	   return:
      	....
      
      I tried to find a proper explanation for this, but the changelog is
      sparse and there are no mails explaining it further. But obviously
      this relates to the interrupt priority levels of the m68k and tries to
      be extra clever with nested interrupts. Though this cleverness just
      adds code bloat to the interrupt hotpath.
      
      For the common case of non nested interrupts the code runs through two
      extra conditionals to the only important one, which checks whether the
      return is to kernel or user space.
      
      For the nested case the checks for in_hardirq() and the priority mask
      value on stack catch only the case where the nested interrupt happens
      inside the hard irq context of the first interrupt. If the nested
      interrupt happens while the first interrupt handles soft interrupts,
      then these extra checks buy nothing. The nested interrupt will fall
      through to the final kernel/user space return check at
      ret_from_exception.
      
      Changing the code flow in the following way:
      
          do_IRQ();
      	irq_enter();
      	    add_preempt_count(HARDIRQ_OFFSET);
      	handle_interrupt();    
      	irq_exit();    
      	    sub_preempt_count(HARDIRQ_OFFSET);
      	    if (in_interrupt())
             	       return;
      	    if (local_softirq_pending())
             	       do_softirq();
      
          ret_from_exception:
      	if (interrupted_context_is_kernel)
      	   return:
      
      makes the region protected by the hardirq count slightly smaller and
      the softirq handling is invoked with a minimal deeper stack. But
      otherwise it's completely functional equivalent and saves 104 bytes of
      text in arch/m68k/kernel/entry.o.
      
      This modification allows us further to get rid of the limitations
      which m68k puts on the preempt_count layout, so we can make the
      preempt count bits completely generic.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NMichael Schmitz <schmitz@biophys.uni-duesseldorf.de>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Linux/m68k <linux-m68k@vger.kernel.org>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1311112052360.30673@ionos.tec.linutronix.de
      09f90f66
  4. 24 10月, 2013 1 次提交
  5. 26 9月, 2013 1 次提交
  6. 25 9月, 2013 1 次提交
  7. 13 9月, 2013 2 次提交
  8. 10 9月, 2013 1 次提交
  9. 26 8月, 2013 5 次提交
  10. 23 8月, 2013 2 次提交
    • G
      m68k/atari: ARAnyM - Always use physical addresses in NatFeat calls · 55490050
      Geert Uytterhoeven 提交于
      Pointers passed to ARAnyM NatFeat calls should be physical addresses,
      not virtual addresses. This worked before because on Atari, physical and
      virtual kernel addresses are the same, as long as normal kernel memory
      is concerned.
      
      Correct the few remaining places where virtual addresses were used.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      55490050
    • G
      m68k: Ignore disabled HSYNC interrupt on Atari for irqs_disabled() · 3c776a07
      Geert Uytterhoeven 提交于
      When running a multi-platform kernel on Atari, warning messages like
      the following may be printed:
      
          WARNING: at /root/linux-3.10.1/init/main.c:698 do_one_initcall+0x12e/0x13a()
          initcall param_sysfs_init+0x0/0x1a4 returned with disabled interrupts
      
      This is caused by the different definitions of ALLOWINT for Atari and
      other platforms:
      
          #if defined(MACH_ATARI_ONLY)
          #define ALLOWINT        (~0x500)
          #else
          #define ALLOWINT        (~0x700)
          #endif
      
      On Atari, we want to disable the high-frequency HSYNC interrupt:
        - On Atari-only kernels, this is handled completely through ALLOWINT,
        - On multi-platform kernels, this is handled by disabling the HSYNC
          interrupt from the interrupt handler.
      
      However, as in the latter case arch_irqs_disabled_flags() didn't ignore the
      disabling of the HSYNC interrupt, irqs_disabled() would detect false
      positives.
      
      Ignore the HSYNC interrupt when running on Atari to fix this.
      For single-platform kernels this test is optimized away by the compiler.
      Reported-by: NThorsten Glaser <tg@debian.org>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Tested-by: NThorsten Glaser <tg@debian.org>
      3c776a07
  11. 14 8月, 2013 3 次提交
    • F
      m68k: hardirq_count() only need preempt_mask.h · a703f9b7
      Frederic Weisbecker 提交于
      The m68k irqflags implementation needs to check hardirq
      context in some cases.
      
      As it is a very low level header file, it's better to
      include preempt_mask.h rather than hardirq.h when the
      only purpose is to use irq context APIs. This way we
      can avoid future header circular dependencies when
      vtime.h will expand to use static keys.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Kevin Hilman <khilman@linaro.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      a703f9b7
    • A
      m68k: Truncate base in do_div() · ea077b1b
      Andreas Schwab 提交于
      Explicitly truncate the second operand of do_div() to 32 bits to guard
      against bogus code calling it with a 64-bit divisor.
      
      [Thorsten]
      
      After upgrading from 3.2 to 3.10, mounting a btrfs volume fails with:
      
      btrfs: setting nodatacow, compression disabled
      btrfs: enabling auto recovery
      btrfs: disk space caching is enabled
      *** ZERO DIVIDE ***   FORMAT=2
      Current process id is 722
      BAD KERNEL TRAP: 00000000
      Modules linked in: evdev mac_hid ext4 crc16 jbd2 mbcache btrfs xor lzo_compress zlib_deflate raid6_pq crc32c libcrc32c
      PC: [<319535b2>] __btrfs_map_block+0x11c/0x119a [btrfs]
      SR: 2000  SP: 30c1fab4  a2: 30f0faf0
      d0: 00000000    d1: 00001000    d2: 00000000    d3: 00000000
      d4: 00010000    d5: 00000000    a0: 3085c72c    a1: 3085c72c
      Process mount (pid: 722, task=30f0faf0)
      Frame format=2 instr addr=319535ae
      Stack from 30c1faec:
              00000000 00000020 00000000 00001000 00000000 01401000 30253928 300ffc00
              00a843ac 3026f640 00000000 00010000 0009e250 00d106c0 00011220 00000000
              00001000 301c6830 0009e32a 000000ff 00000009 3085c72c 00000000 00000000
              30c1fd14 00000000 00000020 00000000 30c1fd14 0009e26c 00000020 00000003
              00000000 0009dd8a 300b0b6c 30253928 00a843ac 00001000 00000000 00000000
              0000a008 3194e76a 30253928 00a843ac 00001000 00000000 00000000 00000002
      Call Trace: [<00001000>] kernel_pg_dir+0x0/0x1000
      
          [...]
      
      Code: 222e ff74 2a2e ff5c 2c2e ff60 4c45 1402 <2d40> ff64 2d41 ff68 2205 4c2e 1800 ff68 4c04 0800 2041 d1c0 2206 4c2e 1400 ff68
      
      [Geert]
      
      As diagnosed by Andreas, fs/btrfs/volumes.c:__btrfs_map_block()
      calls
      
          do_div(stripe_nr, stripe_len);
      
      with stripe_len u64, while do_div() assumes the divisor is a 32-bit number.
      
      Due to the lack of truncation in the m68k-specific implementation of
      do_div(), the division is performed using the upper 32-bit word of
      stripe_len, which is zero.
      
      This was introduced by commit 53b381b3
      ("Btrfs: RAID5 and RAID6"), which changed the divisor from
      map->stripe_len (struct map_lookup.stripe_len is int) to a 64-bit temporary.
      Reported-by: NThorsten Glaser <tg@debian.org>
      Signed-off-by: NAndreas Schwab <schwab@linux-m68k.org>
      Tested-by: NThorsten Glaser <tg@debian.org>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: stable@vger.kernel.org
      ea077b1b
    • G
      m68k/atari: ARAnyM - Fix NatFeat module support · e8184e10
      Geert Uytterhoeven 提交于
      As pointed out by Andreas Schwab, pointers passed to ARAnyM NatFeat calls
      should be physical addresses, not virtual addresses.
      
      Fortunately on Atari, physical and virtual kernel addresses are the same,
      as long as normal kernel memory is concerned, so this usually worked fine
      without conversion.
      
      But for modules, pointers to literal strings are located in vmalloc()ed
      memory. Depending on the version of ARAnyM, this causes the nf_get_id()
      call to just fail, or worse, crash ARAnyM itself with e.g.
      
          Gotcha! Illegal memory access. Atari PC = $968c
      
      This is a big issue for distro kernels, who want to have all drivers as
      loadable modules in an initrd.
      
      Add a wrapper for nf_get_id() that copies the literal to the stack to
      work around this issue.
      Reported-by: NThorsten Glaser <tg@debian.org>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: stable@vger.kernel.org
      e8184e10
  12. 26 7月, 2013 1 次提交
  13. 15 7月, 2013 1 次提交
  14. 04 7月, 2013 6 次提交
    • J
      mm/m68k: fix build warning of unused variable · 3e548a9e
      Jiang Liu 提交于
      Fix build warning of unused variable:
      
        arch/m68k/mm/init.c: In function 'mem_init': arch/m68k/mm/init.c:151:6: warning: unused variable 'i' [-Wunused-variable]
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3e548a9e
    • J
      mm/m68k: prepare for killing free_all_bootmem_node() · b69a9787
      Jiang Liu 提交于
      Prepare for killing free_all_bootmem_node() by using free_all_bootmem().
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b69a9787
    • J
      mm/m68k: prepare for removing num_physpages and simplify mem_init() · 9671468f
      Jiang Liu 提交于
      Prepare for removing num_physpages and simplify mem_init().
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9671468f
    • J
      mm: concentrate modification of totalram_pages into the mm core · 0c988534
      Jiang Liu 提交于
      Concentrate code to modify totalram_pages into the mm core, so the arch
      memory initialized code doesn't need to take care of it.  With these
      changes applied, only following functions from mm core modify global
      variable totalram_pages: free_bootmem_late(), free_all_bootmem(),
      free_all_bootmem_node(), adjust_managed_page_count().
      
      With this patch applied, it will be much more easier for us to keep
      totalram_pages and zone->managed_pages in consistence.
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: <sworddragon2@aol.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Jianguo Wu <wujianguo@huawei.com>
      Cc: Joonsoo Kim <js1304@gmail.com>
      Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      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>
      0c988534
    • J
      mm: enhance free_reserved_area() to support poisoning memory with zero · dbe67df4
      Jiang Liu 提交于
      Address more review comments from last round of code review.
      1) Enhance free_reserved_area() to support poisoning freed memory with
         pattern '0'. This could be used to get rid of poison_init_mem()
         on ARM64.
      2) A previous patch has disabled memory poison for initmem on s390
         by mistake, so restore to the original behavior.
      3) Remove redundant PAGE_ALIGN() when calling free_reserved_area().
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: <sworddragon2@aol.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Jianguo Wu <wujianguo@huawei.com>
      Cc: Joonsoo Kim <js1304@gmail.com>
      Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      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>
      dbe67df4
    • J
      mm: change signature of free_reserved_area() to fix building warnings · 11199692
      Jiang Liu 提交于
      Change signature of free_reserved_area() according to Russell King's
      suggestion to fix following build warnings:
      
        arch/arm/mm/init.c: In function 'mem_init':
        arch/arm/mm/init.c:603:2: warning: passing argument 1 of 'free_reserved_area' makes integer from pointer without a cast [enabled by default]
          free_reserved_area(__va(PHYS_PFN_OFFSET), swapper_pg_dir, 0, NULL);
          ^
        In file included from include/linux/mman.h:4:0,
                         from arch/arm/mm/init.c:15:
        include/linux/mm.h:1301:22: note: expected 'long unsigned int' but argument is of type 'void *'
         extern unsigned long free_reserved_area(unsigned long start, unsigned long end,
      
         mm/page_alloc.c: In function 'free_reserved_area':
      >> mm/page_alloc.c:5134:3: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast [enabled by default]
         In file included from arch/mips/include/asm/page.h:49:0,
                          from include/linux/mmzone.h:20,
                          from include/linux/gfp.h:4,
                          from include/linux/mm.h:8,
                          from mm/page_alloc.c:18:
         arch/mips/include/asm/io.h:119:29: note: expected 'const volatile void *' but argument is of type 'long unsigned int'
         mm/page_alloc.c: In function 'free_area_init_nodes':
         mm/page_alloc.c:5030:34: warning: array subscript is below array bounds [-Warray-bounds]
      
      Also address some minor code review comments.
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: <sworddragon2@aol.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Jianguo Wu <wujianguo@huawei.com>
      Cc: Joonsoo Kim <js1304@gmail.com>
      Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      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>
      11199692
  15. 29 6月, 2013 1 次提交
  16. 28 6月, 2013 1 次提交
    • G
      lib: Move fonts from drivers/video/console/ to lib/fonts/ · ee89bd6b
      Geert Uytterhoeven 提交于
      Several drivers need font support independent of CONFIG_VT, cfr. commit
      9cbce8d7e1dae0744ca4f68d62aa7de18196b6f4, "console/font: Refactor font
      support code selection logic").
      Hence move the fonts and their support logic from drivers/video/console/ to
      its own library directory lib/fonts/.
      This also allows to limit processing of drivers/video/console/Makefile to
      CONFIG_VT=y again.
      
      [Kevin Hilman <khilman@linaro.org>: Update arch/arm/boot/compressed/Makefile]
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      ee89bd6b
  17. 25 6月, 2013 6 次提交