1. 31 3月, 2009 10 次提交
    • H
      parisc: add ftrace (function and graph tracer) functionality · d75f054a
      Helge Deller 提交于
      This patch adds the ftrace debugging functionality to the parisc kernel.
      It will currently only work with 64bit kernels, because the gcc options -pg
      and -ffunction-sections can't be enabled at the same time and -ffunction-sections
      is still needed to be able to link 32bit kernels.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      d75f054a
    • H
      parisc: simplify sys_clone() · 803094f4
      Helge Deller 提交于
      No need to test clone_flags here and set parent_tidptr and child_tidptr
      accordingly. The same check will be done in do_fork() and copy_process() anyway.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      803094f4
    • H
      548f1176
    • H
      parisc: allow to build with 16k default kernel page size · afca2523
      Helge Deller 提交于
      Introduce new convert_for_tlb_insert20 macro and use it to replace assembler
      statements with hardcoded constants.
      This change allows the parisc64 kernel to boot with 16kb default kernel page size,
      aka CONFIG_PARISC_PAGE_SIZE_16KB=y.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      afca2523
    • C
      parisc: expose 32/64-bit capabilities in cpuinfo · 445c088f
      Colin Watson 提交于
      It'd be rather useful for debian-installer if we could get hold of
      accurate firmware information on whether only 32-bit kernels are
      supported, only 64-bit kernels, or both; this would allow us to present
      an accurate menu of kernel packages if more than one is available,
      rather than the user having to guess. This patch attempts to expose it
      in cpuinfo.
      
      I adjusted pdc_model_capabilities to cope with a potential
      PDC_INVALID_ARG return as the firmware manual instructs, by assuming
      32-bit only. This may be the wrong place for it.
      
      I made up user-visible capability names by total fiat and for the moment
      ignored the other bits that may appear in the capabilities word.
      
      I have no PA-RISC machine myself to test on, and no PA experience
      either, so I rather hope that somebody will kind-heartedly take this and
      fix it up if needed. I ran it past Dann Frazier on IRC and he said
      "looks good to me", but I think without testing.
      
      Also, this is against the Ubuntu 2.6.28 kernel tree since that's what I
      had handy and I was a bit tight on disk space to slurp down another
      tree. Sorry if it's skewed in any relevant way; I'll be happy to adjust
      if necessary.
      
      Thanks in advance!
      Signed-off-by: NColin Watson <cjwatson@canonical.com>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      445c088f
    • H
      parisc: use constants instead of numbers in assembly · 1152a68c
      Helge Deller 提交于
      A few small fixups:
      * _PAGE_SIZE_ENCODING_DEFAULT is wrong here, as one might assume that
        it's possible to define the page size that way. This is wrong. Use 0 instead.
      * use constants instead of hardcoded numerical values in depi and extru
        while building the PFN out of the pte entry
      * use SHRREG instead of extru (iitlba expects the PFN at bits {7..26})
      
      Still wondering why we can use the same register (pte) as extru source
      and target register, but it seems to work on PA1.1 and PA2.0...
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      1152a68c
    • H
      parisc: fix usage of 32bit PTE page table entries on 32bit kernels · 48d27cb2
      Helge Deller 提交于
      This patch fixes a long outstanding bug on 32bit parisc linux kernels
      which prevented us from using 32bit PTE table entries (instead of 64bit
      entries of which 32bit were unused).
      
      The problem was caused by this assembler statement in the L2_ptep
      macro in arch/parisc/kernel/entry.S:447:
      	EXTR \va,31-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index
      which expanded to
      	extrw,u r8,9,11,r1
      and which has undefined behavior since the length value (11) extends
      beyond the leftmost bit (11-1 > 9).
      Interestingly PA2.0 processors seem to don't care and just zero-extend
      the value, while PA1.1 processors don't.
      
      Fix this problem by detecting an address space overflow with ASM_BITS_PER_PGD
      and adjusting it accordingly. To prevent such problems in the future,
      some compile time sanity checks in arch/parisc/mm/init.c were added.
      
      Since the page table now only consumes half of it's old size, we can
      use the freed memory to harmonize 32- and 64bit kernels and let both
      map 16MB for the initial page table.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      48d27cb2
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
    • R
      PM: Rework handling of interrupts during suspend-resume · 2ed8d2b3
      Rafael J. Wysocki 提交于
      Use the functions introduced in by the previous patch,
      suspend_device_irqs(), resume_device_irqs() and check_wakeup_irqs(),
      to rework the handling of interrupts during suspend (hibernation) and
      resume.  Namely, interrupts will only be disabled on the CPU right
      before suspending sysdevs, while device drivers will be prevented
      from receiving interrupts, with the help of the new helper function,
      before their "late" suspend callbacks run (and analogously during
      resume).
      
      In addition, since the device interrups are now disabled before the
      CPU has turned all interrupts off and the CPU will ACK the interrupts
      setting the IRQ_PENDING bit for them, check in sysdev_suspend() if
      any wake-up interrupts are pending and abort suspend if that's the
      case.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      2ed8d2b3
    • S
  2. 30 3月, 2009 30 次提交