1. 20 4月, 2008 8 次提交
    • A
      avr32: add include/asm-avr32/serial.h · 29a0c393
      Adrian Bunk 提交于
      On Mon, Apr 14, 2008 at 03:36:24PM +0100, Alan Cox wrote:
      > On Mon, 14 Apr 2008 17:17:21 +0300
      > Adrian Bunk <bunk@kernel.org> wrote:
      >
      > > This patch fixes the following build error:
      > >
      > > <--  snip  -->
      > >
      > > ...
      > >   CC [M]  drivers/serial/8250.o
      > > /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/serial/8250.c:95:24: error: asm/serial.h: No such file or directory
      > > make[3]: *** [drivers/serial/8250.o] Error 1
      > >
      > > <--  snip  -->
      > >
      > > Signed-off-by: Adrian Bunk <bunk@kernel.org>
      > >
      > > ---
      > > 3cb4ef80d75e118ccfd44f7006aea3db54afb31c diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
      > > index b1bbaa0..b0e216d 100644
      > > --- a/drivers/serial/Kconfig
      > > +++ b/drivers/serial/Kconfig
      > > @@ -11,7 +11,7 @@ menu "Serial drivers"
      > >  # The new 8250/16550 serial drivers
      > >  config SERIAL_8250
      > >  	tristate "8250/16550 and compatible serial support"
      > > -	depends on (BROKEN || !SPARC)
      > > +	depends on (BROKEN || !SPARC) && !AVR32
      > >  	select SERIAL_CORE
      > >  	---help---
      >
      > NAK.
      >
      > Add an asm/serial.h to the platform as it has PCI so will have 8250 PCI
      > devices available to it. A copy of the MIPS one should be right.
      
      Patch below.
      
      > Alan
      
      cu
      Adrian
      
      <--  snip  -->
      
      This patch fixes the following build error with CONFIG_SERIAL_8250:
      
      <--  snip  -->
      
      ...
        CC [M]  drivers/serial/8250.o
      /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/serial/8250.c:95:24: error: asm/serial.h: No such file or directory
      make[3]: *** [drivers/serial/8250.o] Error 1
      
      <--  snip  -->
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      29a0c393
    • A
      add include/asm-avr32/xor.h · 5e840eca
      Adrian Bunk 提交于
      This patch fixes the following compile error with CONFIG_MD_RAID456
      on avr32:
      
      <--  snip  -->
      
      ...
        CC [M]  crypto/xor.o
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c:23:21: error: asm/xor.h: No such file or directory
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c: In function 'calibrate_xor_blocks':
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c:131: error: 'XOR_TRY_TEMPLATES' undeclared (first use in this function)
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c:131: error: (Each undeclared identifier is reported only once
      /home/bunk/linux/kernel-2.6/git/linux-2.6/crypto/xor.c:131: error: for each function it appears in.)
      make[2]: *** [crypto/xor.o] Error 1
      
      <--  snip  -->
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      5e840eca
    • D
      avr32: Generic clockevents support · e723ff66
      David Brownell 提交于
      This combines three patches from David Brownell:
        * avr32: tclib support
        * avr32: simplify clocksources
        * avr32: Turn count/compare into a oneshot clockevent device
      
      Register both TC blocks (instead of just the first one) so that
      the AT32/AT91 tclib code will pick them up (instead of just the
      avr32-only PIT-style clocksource).
      
      Rename the first one and its resources appropriately.
      
      More cleanups to the cycle counter clocksource code
      
       - Disable all the weak symbol magic; remove the AVR32-only TCB-based
         clocksource code (source and header).
      
       - Mark the __init code properly.
      
       - Don't forget to report IRQF_TIMER.
      
       - Make the system work properly with this clocksource, by preventing
         use of the CPU "idle" sleep state in the idle loop when it's used.
      
      Package the avr32 count/compare timekeeping support as a oneshot
      clockevent device, so it supports NO_HZ and high res timers.
      This means it also supports plugging in other clockevent devices
      and clocksources.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      e723ff66
    • H
      avr32: Move sleep code into mach-at32ap · 7e59128f
      Haavard Skinnemoen 提交于
      Create a new file, pm-at32ap700x.S, in mach-at32ap and move the CPU
      idle sleep code there. Make it possible to disable the sleep code.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      7e59128f
    • H
      02f99d1c
    • H
      avr32: Delete mostly unused header asm/intc.h · 46acb55b
      Haavard Skinnemoen 提交于
      Move the only thing that was actually implemented and used in
      asm/intc.h, intc_get_pending(), into asm/irq.h and delete asm/intc.h
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      46acb55b
    • B
      avr32: pass i2c board info through at32_add_device_twi · 040b28fc
      Ben Nizette 提交于
      New-style I2C drivers require that motherboard-mounted I2C devices are
      registered with the I2C core, typically at arch_initcall time.  This
      can be done nice and neat by passing the struct i2c_board_info[]
      through at32_add_device_twi just like we do for the SPI board info.
      
      While we've got the hood up, remove a duplicate declaration of
      at32_add_device_twi() in board.h.
      
      [hskinnemoen@atmel.com: add missing i2c_board_info forward-declaration]
      Signed-Off-By: NBen Nizette <bn@niasdigital.com>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      040b28fc
    • C
      avr32: cleanup - use _AC macro to define PAGE_SIZE · e573ebb0
      Cyrill Gorcunov 提交于
      PAGE_SIZE is used both from assembly and C code. We want to have type
      specifiers when using it from C, but this will make the assembler
      confused, so we need to make it conditional.
      
      This is exactly what the _AC macro is for, so using it allows us to
      get rid of a few lines of cpp noise.
      Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      e573ebb0
  2. 17 4月, 2008 1 次提交
  3. 07 4月, 2008 1 次提交
  4. 03 4月, 2008 1 次提交
    • C
      kvm: provide kvm.h for all architecture: fixes headers_install · dd135ebb
      Christian Borntraeger 提交于
      Currently include/linux/kvm.h is not considered by make headers_install,
      because Kbuild cannot handle " unifdef-$(CONFIG_FOO) += foo.h.  This problem
      was introduced by
      
      commit fb56dbb3
      Author: Avi Kivity <avi@qumranet.com>
      Date:   Sun Dec 2 10:50:06 2007 +0200
      
          KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM
      
          Currently, make headers_check barfs due to <asm/kvm.h>, which <linux/kvm.h>
          includes, not existing.  Rather than add a zillion <asm/kvm.h>s, export kvm.
          only if the arch actually supports it.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      
      which makes this an 2.6.25 regression.
      
      One way of solving the issue is to enhance Kbuild, but Avi and David conviced
      me, that changing headers_install is not the way to go.  This patch changes
      the definition for linux/kvm.h to unifdef-y.
      
      If  unifdef-y is used for linux/kvm.h "make headers_check" will fail on all
      architectures without asm/kvm.h.  Therefore, this patch also provides
      asm/kvm.h on all architectures.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NAvi Kivity <avi@qumranet.com>
      Cc: Sam Ravnborg <sam@ravnborg.org
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dd135ebb
  5. 10 3月, 2008 1 次提交
  6. 13 2月, 2008 1 次提交
  7. 09 2月, 2008 4 次提交
    • M
      CONFIG_HIGHPTE vs. sub-page page tables. · 2f569afd
      Martin Schwidefsky 提交于
      Background: I've implemented 1K/2K page tables for s390.  These sub-page
      page tables are required to properly support the s390 virtualization
      instruction with KVM.  The SIE instruction requires that the page tables
      have 256 page table entries (pte) followed by 256 page status table entries
      (pgste).  The pgstes are only required if the process is using the SIE
      instruction.  The pgstes are updated by the hardware and by the hypervisor
      for a number of reasons, one of them is dirty and reference bit tracking.
      To avoid wasting memory the standard pte table allocation should return
      1K/2K (31/64 bit) and 2K/4K if the process is using SIE.
      
      Problem: Page size on s390 is 4K, page table size is 1K or 2K.  That means
      the s390 version for pte_alloc_one cannot return a pointer to a struct
      page.  Trouble is that with the CONFIG_HIGHPTE feature on x86 pte_alloc_one
      cannot return a pointer to a pte either, since that would require more than
      32 bit for the return value of pte_alloc_one (and the pte * would not be
      accessible since its not kmapped).
      
      Solution: The only solution I found to this dilemma is a new typedef: a
      pgtable_t.  For s390 pgtable_t will be a (pte *) - to be introduced with a
      later patch.  For everybody else it will be a (struct page *).  The
      additional problem with the initialization of the ptl lock and the
      NR_PAGETABLE accounting is solved with a constructor pgtable_page_ctor and
      a destructor pgtable_page_dtor.  The page table allocation and free
      functions need to call these two whenever a page table page is allocated or
      freed.  pmd_populate will get a pgtable_t instead of a struct page pointer.
       To get the pgtable_t back from a pmd entry that has been installed with
      pmd_populate a new function pmd_pgtable is added.  It replaces the pmd_page
      call in free_pte_range and apply_to_pte_range.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2f569afd
    • D
      Basic PWM driver for AVR32 and AT91 · 9a1e8eb1
      David Brownell 提交于
      PWM device setup, and a simple PWM driver exposing a programming interface
      giving access to each channel's full capabilities.  Note that this doesn't
      support starting several channels in synch.
      
      [hskinnemoen@atmel.com: allocate platform device dynamically]
      [hskinnemoen@atmel.com: Kconfig fix]
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Andrew Victor <linux@maxim.org.za>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9a1e8eb1
    • M
      asm-*/posix_types.h: scrub __GLIBC__ · 531d7d42
      Mike Frysinger 提交于
      Some arches (like alpha and ia64) already have a clean posix_types.h header.
      This brings all the others in line by removing all references to __GLIBC__
      (and some undocumented __USE_ALL).
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      531d7d42
    • D
      aout: move STACK_TOP[_MAX] to asm/processor.h · 922a70d3
      David Howells 提交于
      Move STACK_TOP[_MAX] out of asm/a.out.h and into asm/processor.h as they're
      required whether or not A.OUT format is available.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      922a70d3
  8. 08 2月, 2008 3 次提交
  9. 07 2月, 2008 2 次提交
    • J
      Fix __const_udelay declaration and definition mismatches · 5ab24c79
      Jeff Dike 提交于
      The declaration and implementation of __const_udelay use different
      names for the parameter on a number of architectures:
      
      include/asm-avr32/delay.h:15:extern void __const_udelay(unsigned long usecs);
      arch/avr32/lib/delay.c:39:inline void __const_udelay(unsigned long xloops)
      
      include/asm-sh/delay.h:15:extern void __const_udelay(unsigned long usecs);
      arch/sh/lib/delay.c:22:inline void __const_udelay(unsigned long xloops)
      
      include/asm-m32r/delay.h:15:extern void __const_udelay(unsigned long usecs);
      arch/m32r/lib/delay.c:58:void __const_udelay(unsigned long xloops)
      
      include/asm-x86/delay.h:16:extern void __const_udelay(unsigned long usecs);
      arch/x86/lib/delay_32.c:82:inline void __const_udelay(unsigned long xloops)
      arch/x86/lib/delay_64.c:46:inline void __const_udelay(unsigned long xloops)
      
      The units of the parameter isn't usecs, so that name is definitely
      wrong.  It's also not exactly loops, so I suppose xloops is an OK
      name.
      
      This patch changes these names from usecs to xloops.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5ab24c79
    • A
      read_current_timer() cleanups · 941e492b
      Andrew Morton 提交于
      - All implementations can be __devinit
      
      - The function prototypes were in asm/timex.h but they all must be the same,
        so create a single declaration in linux/timex.h.
      
      - uninline the sparc64 version to match the other architectures
      
      - Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value.
      
      [ezk@cs.sunysb.edu: fix build]
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      941e492b
  10. 06 2月, 2008 3 次提交
  11. 01 2月, 2008 1 次提交
  12. 29 1月, 2008 1 次提交
  13. 26 1月, 2008 1 次提交
  14. 25 1月, 2008 4 次提交
    • H
      [AVR32] NMI debugging · e7ba176b
      Haavard Skinnemoen 提交于
      Change the NMI handler to use the die notifier chain to signal anyone
      who cares. Add a simple "nmi debugger" which hooks into this chain and
      that may dump registers, task state, etc. when it happens.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      e7ba176b
    • H
      [AVR32] Add support for AT32AP7001 and AT32AP7002 · 438ff3f3
      Haavard Skinnemoen 提交于
      These are derivatives of the AT32AP7000 chip, which means that most of
      the code stays the same. Rename a few files, functions, definitions
      and config symbols to reflect that they apply to all AP700x chips, and
      exclude some platform devices from chips where they aren't present.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      438ff3f3
    • H
      [AVR32] Provide more CPU information in /proc/cpuinfo and dmesg · 281ef58c
      Haavard Skinnemoen 提交于
      Add the following fields to /proc/cpuinfo:
        * chip type and revision (from the JTAG chip id)
        * cpu MHz (from clk_get_rate())
        * features (from the CONFIG0 register)
      
      Also rename "cpu family" to "cpu arch" and "cpu type" to "cpu core" to
      remove some ambiguity.
      
      Show chip type and revision at bootup, and clarify that the other
      kinds of IDs that we're already printing are for the cpu core and
      architecture. Rename "AP7000" to "AP7" since that's the name of the
      core.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      281ef58c
    • H
      [AVR32] Enable debugging only when needed · 13b54a50
      Haavard Skinnemoen 提交于
      Keep track of processes being debugged (including the kernel itself)
      and turn the OCD system on and off as appropriate. Since enabling
      debugging turns off some optimizations in the CPU core, this fixes the
      issue that enabling KProbes support or simply running a program under
      gdbserver will reduce system performance significantly until the next
      reboot.
      
      The CPU performance will still be reduced for all processes while a
      process is being debugged, but this is a lot better than reducing the
      performance forever.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      13b54a50
  15. 07 12月, 2007 6 次提交
    • H
      [AVR32] Fix copy_to_user_page() breakage · 68ca3e53
      Haavard Skinnemoen 提交于
      The current implementation of copy_to_user_page() gives "vaddr" to the
      cache instruction when trying to sync the icache with the dcache. If
      vaddr does not exist in the TLB, the CPU will silently abort the
      operation, which may result in the caches staying out of sync.
      
      To fix this, pass the "dst" parameter to flush_icache_range() instead
      -- we know this is valid because we just wrote to it.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      68ca3e53
    • H
      [AVR32] Follow the rules when dealing with the OCD system · 2507bc13
      Haavard Skinnemoen 提交于
      The current debug trap handling code does a number of things that are
      illegal according to the AVR32 Architecture manual. Most importantly,
      it may try to schedule from Debug Mode, thus clearing the D bit, which
      can lead to "undefined behaviour".
      
      It seems like this works in most cases, but several people have
      observed somewhat unstable behaviour when debugging programs,
      including soft lockups. So there's definitely something which is not
      right with the existing code.
      
      The new code will never schedule from Debug mode, it will always exit
      Debug mode with a "retd" instruction, and if something not running in
      Debug mode needs to do something debug-related (like doing a single
      step), it will enter debug mode through a "breakpoint" instruction.
      The monitor code will then return directly to user space, bypassing
      its own saved registers if necessary (since we don't actually care
      about the trapped context, only the one that came before.)
      
      This adds three instructions to the common exception handling code,
      including one branch. It does not touch super-hot paths like the TLB
      miss handler.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      2507bc13
    • H
      [AVR32] Clean up OCD register usage · 8dfe8f29
      Haavard Skinnemoen 提交于
      Generate a new set of OCD register definitions in asm/ocd.h and rename
      __mfdr() and __mtdr() to ocd_read() and ocd_write() respectively.
      
      The bitfield definitions are a lot more complete now, and they are
      entirely based on bit numbers, not masks. This is because OCD
      registers are frequently accessed from assembly code, where bit
      numbers are a lot more useful (can be fed directly to sbr, bfins,
      etc.)
      
      Bitfields that consist of more than one bit have two definitions:
      _START, which indicates the number of the first bit, and _SIZE, which
      indicates the number of bits. These directly correspond to the
      parameters taken by the bfextu, bfexts and bfins instructions.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      8dfe8f29
    • H
    • H
      [AVR32] Fix invalid status register bit definitions in asm/ptrace.h · df679771
      Haavard Skinnemoen 提交于
      The 'H' bit is bit 29, while the 'R' bit doesn't exist. Luckily, we
      don't actually use any of the bits in question.
      
      Also update show_regs() to show the Debug Mask and Debug state bits.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      df679771
    • H
      [AVR32] Add TIF_RESTORE_SIGMASK to the work masks · 702f22b3
      Haavard Skinnemoen 提交于
      We really need to check TIF_RESTORE_SIGMASK before returning to
      userspace. The existing code does not necessarily do this.
      
      Define the work masks as a bitwise OR of the respective flags instead
      of a hardcoded hex value to make it easier to spot errors like this in
      the future.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      702f22b3
  16. 15 11月, 2007 1 次提交
  17. 24 10月, 2007 1 次提交
    • H
      AVR32: Fix sg_page breakage · 18ccc419
      Haavard Skinnemoen 提交于
      The latest sg changes introduce the following build errors on AVR32:
      
      include/asm/dma-mapping.h: In function ‘dma_map_sg’:
      include/asm/dma-mapping.h:220: error: implicit declaration of function ‘sg_page’
      include/asm/dma-mapping.h:220: error: invalid operands to binary -
      include/asm/dma-mapping.h:221: error: implicit declaration of function ‘sg_virt’
      include/asm/dma-mapping.h:221: warning: assignment makes pointer from integer without a cast
      include/asm/dma-mapping.h: In function ‘dma_sync_sg_for_device’:
      include/asm/dma-mapping.h:330: warning: passing argument 2 of ‘dma_cache_sync’ makes pointer from integer without a cast
      
      Fix it by including the correct header file, i.e. linux/scatterlist.h
      instead of asm/scatterlist.h.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      18ccc419