1. 05 2月, 2011 1 次提交
  2. 16 1月, 2011 2 次提交
    • M
      microblaze: Fix asm/pgtable.h · 658b368d
      Michal Simek 提交于
      Function ptep_test_and_clear_young have had wrong the first argument.
      It is also necessary to add __HAVE macros for ptep_test_and_clear_young and
      ptep_get_and_clear functions.
      
      Error log:
      In file included from linux/arch/microblaze/include/asm/pgtable.h:570,
                       from arch/microblaze/mm/pgtable.c:35:
      include/asm-generic/pgtable.h:23: error: conflicting types for 'ptep_test_and_clear_young'
      linux/arch/microblaze/include/asm/pgtable.h:449: error:
      previous definition of 'ptep_test_and_clear_young' was here
      include/asm-generic/pgtable.h:73: error: redefinition of 'ptep_get_and_clear'
      linux/arch/microblaze/include/asm/pgtable.h:462: error:
      previous definition of 'ptep_get_and_clear' was here
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      658b368d
    • M
      microblaze: Fix missing pagemap.h · 1947fc1d
      Michal Simek 提交于
      Add missing linux/pagemap.h to solve compilation error.
      
      Error log:
      In file included from linux/arch/microblaze/include/asm/tlb.h:17,
                       from mm/pgtable-generic.c:9:
      include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
      include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
      include/asm-generic/tlb.h: In function 'tlb_remove_page':
      include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      1947fc1d
  3. 03 1月, 2011 1 次提交
  4. 01 11月, 2010 1 次提交
  5. 27 10月, 2010 1 次提交
  6. 21 10月, 2010 18 次提交
  7. 07 10月, 2010 1 次提交
    • D
      Fix IRQ flag handling naming · df9ee292
      David Howells 提交于
      Fix the IRQ flag handling naming.  In linux/irqflags.h under one configuration,
      it maps:
      
      	local_irq_enable() -> raw_local_irq_enable()
      	local_irq_disable() -> raw_local_irq_disable()
      	local_irq_save() -> raw_local_irq_save()
      	...
      
      and under the other configuration, it maps:
      
      	raw_local_irq_enable() -> local_irq_enable()
      	raw_local_irq_disable() -> local_irq_disable()
      	raw_local_irq_save() -> local_irq_save()
      	...
      
      This is quite confusing.  There should be one set of names expected of the
      arch, and this should be wrapped to give another set of names that are expected
      by users of this facility.
      
      Change this to have the arch provide:
      
      	flags = arch_local_save_flags()
      	flags = arch_local_irq_save()
      	arch_local_irq_restore(flags)
      	arch_local_irq_disable()
      	arch_local_irq_enable()
      	arch_irqs_disabled_flags(flags)
      	arch_irqs_disabled()
      	arch_safe_halt()
      
      Then linux/irqflags.h wraps these to provide:
      
      	raw_local_save_flags(flags)
      	raw_local_irq_save(flags)
      	raw_local_irq_restore(flags)
      	raw_local_irq_disable()
      	raw_local_irq_enable()
      	raw_irqs_disabled_flags(flags)
      	raw_irqs_disabled()
      	raw_safe_halt()
      
      with type checking on the flags 'arguments', and then wraps those to provide:
      
      	local_save_flags(flags)
      	local_irq_save(flags)
      	local_irq_restore(flags)
      	local_irq_disable()
      	local_irq_enable()
      	irqs_disabled_flags(flags)
      	irqs_disabled()
      	safe_halt()
      
      with tracing included if enabled.
      
      The arch functions can now all be inline functions rather than some of them
      having to be macros.
      
      Signed-off-by: David Howells <dhowells@redhat.com> [X86, FRV, MN10300]
      Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> [Tile]
      Signed-off-by: Michal Simek <monstr@monstr.eu> [Microblaze]
      Tested-by: Catalin Marinas <catalin.marinas@arm.com> [ARM]
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [AVR]
      Acked-by: Tony Luck <tony.luck@intel.com> [IA-64]
      Acked-by: Hirokazu Takata <takata@linux-m32r.org> [M32R]
      Acked-by: Greg Ungerer <gerg@uclinux.org> [M68K/M68KNOMMU]
      Acked-by: Ralf Baechle <ralf@linux-mips.org> [MIPS]
      Acked-by: Kyle McMartin <kyle@mcmartin.ca> [PA-RISC]
      Acked-by: Paul Mackerras <paulus@samba.org> [PowerPC]
      Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [S390]
      Acked-by: Chen Liqin <liqin.chen@sunplusct.com> [Score]
      Acked-by: Matt Fleming <matt@console-pimps.org> [SH]
      Acked-by: David S. Miller <davem@davemloft.net> [Sparc]
      Acked-by: Chris Zankel <chris@zankel.net> [Xtensa]
      Reviewed-by: Richard Henderson <rth@twiddle.net> [Alpha]
      Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> [H8300]
      Cc: starvik@axis.com [CRIS]
      Cc: jesper.nilsson@axis.com [CRIS]
      Cc: linux-cris-kernel@axis.com
      df9ee292
  8. 11 8月, 2010 3 次提交
  9. 08 8月, 2010 1 次提交
  10. 05 8月, 2010 1 次提交
    • B
      memblock: Introduce default allocation limit and use it to replace explicit ones · e63075a3
      Benjamin Herrenschmidt 提交于
      This introduce memblock.current_limit which is used to limit allocations
      from memblock_alloc() or memblock_alloc_base(..., MEMBLOCK_ALLOC_ACCESSIBLE).
      
      The old MEMBLOCK_ALLOC_ANYWHERE changes value from 0 to ~(u64)0 and can still
      be used with memblock_alloc_base() to allocate really anywhere.
      
      It is -no-longer- cropped to MEMBLOCK_REAL_LIMIT which disappears.
      
      Note to archs: I'm leaving the default limit to MEMBLOCK_ALLOC_ANYWHERE. I
      strongly recommend that you ensure that you set an appropriate limit
      during boot in order to guarantee that an memblock_alloc() at any time
      results in something that is accessible with a simple __va().
      
      The reason is that a subsequent patch will introduce the ability for
      the array to resize itself by reallocating itself. The MEMBLOCK core will
      honor the current limit when performing those allocations.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e63075a3
  11. 04 8月, 2010 8 次提交
    • M
      microblaze: Add KGDB support · 2d5973cb
      Michal Simek 提交于
      Kgdb uses brki r16, 0x18 instruction to call
      low level _debug_exception function which save
      current state to pt_regs and call microblaze_kgdb_break
      function. _debug_exception should be called only from
      the kernel space. User space calling is not supported
      because user application debugging uses different handling.
      
      pt_regs_to_gdb_regs loads additional special registers
      which can't be changed
      
       * Enable KGDB in Kconfig
       * Remove ancient not-tested KGDB support
       * Remove ancient _debug_exception code from entry.S
      
      Only MMU KGDB support is supported.
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      CC: Jason Wessel <jason.wessel@windriver.com>
      CC: John Williams <john.williams@petalogix.com>
      CC: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
      CC: linux-kernel@vger.kernel.org
      Acked-by: NJason Wessel <jason.wessel@windriver.com>
      2d5973cb
    • M
      microblaze: Fix number of pvr regs · aee04d76
      Michal Simek 提交于
      Microblaze has only 11 pvr regs according manual.
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      aee04d76
    • F
      microblaze: remove unused HAVE_ARCH_PCI_SET_DMA_MASK · 75842abf
      FUJITA Tomonori 提交于
      HAVE_ARCH_PCI_SET_DMA_MASK was removed in 2.6.34 (no architecture has
      the own implementation of pci_set_dma_mask).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      75842abf
    • M
      microblaze: Improve ftrace time measuring · 6f34b08f
      Michal Simek 提交于
      I had to comment sched_clock generic function because of broken toolchain.
      It is fine grain timing.
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      6f34b08f
    • S
      microblaze: Add stack unwinder · ce3266c0
      Steven J. Magnani 提交于
      Implement intelligent backtracing by searching for stack frame creation,
      and emitting only return addresses. Use print_hex_dump() to display the
      entire binary kernel stack.
      
      Limitation: MMU kernels are not currently able to trace beyond a system trap
      (interrupt, syscall, etc.). It is the intent of this patch to provide
      infrastructure that can be extended to add this capability later.
      
      Changes from V1:
      * Removed checks in find_frame_creation() that prevented location of the frame
        creation instruction in heavily optimized code
      * Various formatting/commenting/file location tweaks per review comments
      * Dropped Kconfig option to enable STACKTRACE as something logically separate
      Signed-off-by: NSteven J. Magnani <steve@digidescorp.com>
      ce3266c0
    • S
      microblaze: Allow PAGE_SIZE configuration · ba9c4f88
      Steven J. Magnani 提交于
      Allow developer to configure memory page size at compile time.
      Larger pages can improve performance on some workloads.
      
      Based on PowerPC code.
      Signed-off-by: NSteven J. Magnani <steve@digidescorp.com>
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      ba9c4f88
    • M
      microblaze: Fix copy_to_user_page macro · 6847ba91
      Michal Simek 提交于
      copy_to_user_page macro is used in mm/memory.c:access_process_vm
      function. This function is called from ptrace code (POKETEXT, POKEDATA)
      which write data to memory. Microblaze handle physical address for
      caches that's why there is virt_to_phys conversion.
      
      There is potential one location which can caused the problem on WB system.
      
      The important is take a look at write PTRACEs requests
      (POKE/TEXT, DATA, USR).
      
      Note:
      Majority of Microblaze PTRACE code is moved to generic location
      in newer kernel version that's why this solution should work on
      the newest kernel version too.
      
      linux/io.h is in cacheflush because of mm/nommu.c
      
      Tested on a WB system - hello world debugging.
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      6847ba91
    • M
      microblaze: Implement flush_dcache_page macro · 79e87830
      Michal Simek 提交于
      flush_dcache_page macro is necessary to implement for
      JFFS2 rootfs support on WB system.
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      79e87830
  12. 02 8月, 2010 1 次提交
    • M
      microblaze: Fix __copy_to/from_user_inatomic macros · 8d7ec6ee
      Michal Simek 提交于
      __copy_to/from_user_inatomic should call __copy_to/from_user
      because there is not necessary to check access because of kernel function.
      
      might_sleep in copy_to/from_user macros is causing problems
      in debug sessions too (CONFIG_DEBUG_SPINLOCK_SLEEP).
      
      BUG: sleeping function called from invalid context at
      .../arch/microblaze/include/asm/uaccess.h:388
      in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper
      1 lock held by swapper/1:
       #0:  (&p->cred_guard_mutex){......}, at: [<c00d4b90>] prepare_bprm_creds+0x2c/0x88
      Kernel Stack:
      ...
      
      Call Trace:
      [<c0006bd4>] microblaze_unwind+0x7c/0x94
      [<c0006684>] show_stack+0xf4/0x190
      [<c0006730>] dump_stack+0x10/0x30
      [<c00103a0>] __might_sleep+0x12c/0x160
      [<c0090de4>] file_read_actor+0x1d8/0x2a8
      [<c0091568>] generic_file_aio_read+0x6b4/0xa64
      [<c00cd778>] do_sync_read+0xac/0x110
      [<c00ce254>] vfs_read+0xc8/0x160
      [<c00d585c>] kernel_read+0x38/0x64
      [<c00d5984>] prepare_binprm+0xfc/0x130
      [<c00d6430>] do_execve+0x228/0x370
      [<c000614c>] microblaze_execve+0x58/0xa4
      
      caused by file_read_actor (mm/filemap.c) which calls
      __copy_to_user_inatomic.
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      8d7ec6ee
  13. 01 8月, 2010 1 次提交
    • G
      of/address: Clean up function declarations · 22ae782f
      Grant Likely 提交于
      This patch moves the declaration of of_get_address(), of_get_pci_address(),
      and of_pci_address_to_resource() out of arch code and into the common
      linux/of_address header file.
      
      This patch also fixes some of the asm/prom.h ordering issues.  It still
      includes some header files that it ideally shouldn't be, but at least the
      ordering is consistent now so that of_* overrides work.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      22ae782f