1. 13 3月, 2009 2 次提交
  2. 30 1月, 2009 1 次提交
  3. 06 1月, 2009 8 次提交
    • K
      parisc: export length of os_hpmc vector · ae16489e
      Kyle McMartin 提交于
      and use this instead of dealing with exporting start/end and
      toying with function descriptors.
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      ae16489e
    • K
      parisc: fix kernel crash (protection id trap) when compiling ruby1.9 · c61c25eb
      Kyle McMartin 提交于
      On Wed, Dec 17, 2008 at 11:46:05PM +0100, Helge Deller wrote:
      >
      
      Honestly, I can't decide whether to apply this. It really should never
      happen in the kernel, since the kernel can guarantee it won't get the
      access rights failure (highest privilege level, and can set %sr and
      %protid to whatever it wants.)
      
      It really genuinely is a bug that probably should panic the kernel. The
      only precedent I can easily see is x86 fixing up a bad iret with a
      general protection fault, which is more or less analogous to code 27
      here.
      
      On the other hand, taking the exception on a userspace access really
      isn't all that critical, and there's fundamentally little reason for the
      kernel not to SIGSEGV the process, and continue...
      
      Argh.
      
      (btw, I've instrumented my do_sys_poll with a pile of assertions that
       %cr8 << 1 == %sr3 == current->mm.context... let's see if where we're
       getting corrupted is deterministic, though, I would guess that it won't
       be.)
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      c61c25eb
    • J
      parisc: Use DEFINE_SPINLOCK · aefa8b6b
      Julia Lawall 提交于
      SPIN_LOCK_UNLOCKED is deprecated.  The following makes the change suggested
      in Documentation/spinlocks.txt
      
      The semantic patch that makes this change is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@
      declarer name DEFINE_SPINLOCK;
      identifier xxx_lock;
      @@
      
      - spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
      + DEFINE_SPINLOCK(xxx_lock);
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      aefa8b6b
    • H
      parisc: add uevent helper for parisc bus · 7246c31e
      Helge Deller 提交于
      parisc: add uevent helper for parisc bus
      
      udev device-driver auto detection was failing to work on the GSC bus, since
      udev didn't knew wich driver to load due to a missing MODALIAS environment
      variable from kernel.
      
      This patch fixes this by adding the MODALIAS environment variable to the
      uevent kernel notifications.
      Since modalias_show() generated the modalias string already, I splitted this
      out and created a new static function make_modalias() which is now used by
      modalias_show() and the new parisc_uevent() function.
      
      Tested on 715/64 and c3000.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      7246c31e
    • H
      parisc: Replace NR_CPUS in parisc code · ef017beb
      Helge Deller 提交于
      parisc: Replace most arrays sized by NR_CPUS with percpu variables.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      ef017beb
    • H
      parisc: trivial fixes · 7f2347a4
      Helge Deller 提交于
      trivial fixes:
      - use KERN_WARNING for printk()
      - use BUG_ON() instead of "if (xx) BUG();"
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      
      --
      To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
      the body of a message to majordomo@vger.kernel.org
      More majordomo info at  http://vger.kernel.org/majordomo-info.html
      7f2347a4
    • H
      parisc: fix GFP_KERNEL use while atomic in unwinder · e0e7ed48
      Helge Deller 提交于
      Since unwind_frame_init_from_blocked_task() may be called from
      interrupt/in_atomic context, it needs to kmalloc() memory with
      GFP_ATOMIC instead of GFP_KERNEL.
      
      This fixes this warning (ShowTasks called from sysrq handler):
      
      BUG: sleeping function called from invalid context at mm/slab.c:3044
      in_atomic(): 1, irqs_disabled(): 1, pid: 2119, name: miniruby
      Backtrace:
       [<10132e78>] __might_sleep+0x4c/0x118
       [<1018f644>] kmem_cache_alloc+0x2c/0xb4
       [<1011bae0>] unwind_frame_init_from_blocked_task+0x30/0xa0
       [<1010fd3c>] parisc_show_stack+0x3c/0xac
       [<10132c7c>] show_state_filter+0x80/0xd8
       [<102f4074>] __handle_sysrq+0xd0/0x1b0
       [<102f9558>] receive_chars+0x22c/0x318
       [<102f9940>] serial8250_handle_port+0x40/0x88
       [<102f9a8c>] serial8250_interrupt+0x104/0x10c
       [<10161920>] handle_IRQ_event+0x44/0x94
       [<10161acc>] __do_IRQ+0x15c/0x1dc
       [<102c442c>] superio_interrupt+0x74/0xa8
       [<10161920>] handle_IRQ_event+0x44/0x94
       [<10161acc>] __do_IRQ+0x15c/0x1dc
       [<10110fb4>] do_cpu_irq_mask+0x90/0xbc
       [<10114068>] intr_return+0x0/0x4
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      e0e7ed48
    • F
      parisc: remove dead BIO_VMERGE_BOUNDARY and BIO_VMERGE_MAX_SIZE definitions · 00635077
      FUJITA Tomonori 提交于
      The block layer dropped the virtual merge feature
      (b8b3e16c). BIO_VMERGE_BOUNDARY and
      BIO_VMERGE_MAX_SIZE definitions are meaningless now.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Acked-by: NGrant Grundler <grundler@parisc-linux.org>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      00635077
  4. 05 1月, 2009 1 次提交
    • H
      parisc: fix module loading failure of large kernel modules · c298be74
      Helge Deller 提交于
      On 32bit (and sometimes 64bit) and with big kernel modules like xfs or
      ipv6 the relocation types R_PARISC_PCREL17F and R_PARISC_PCREL22F may
      fail to reach their PLT stub if we only create one big stub array for
      all sections at the beginning of the core or init section.
      
      With this patch we now instead add individual PLT stub entries
      directly in front of the code sections where the stubs are actually
      called. This reduces the distance between the PCREL location and the
      stub entry so that the relocations can be fulfilled.
      
      While calculating the final layout of the kernel module in memory, the
      kernel module loader calls arch_mod_section_prepend() to request the
      to be reserved amount of memory in front of each individual section.
      
      Tested with 32- and 64bit kernels.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      c298be74
  5. 01 1月, 2009 1 次提交
  6. 13 12月, 2008 2 次提交
    • R
      cpumask: make irq_set_affinity() take a const struct cpumask · 0de26520
      Rusty Russell 提交于
      Impact: change existing irq_chip API
      
      Not much point with gentle transition here: the struct irq_chip's
      setaffinity method signature needs to change.
      
      Fortunately, not widely used code, but hits a few architectures.
      
      Note: In irq_select_affinity() I save a temporary in by mangling
      irq_desc[irq].affinity directly.  Ingo, does this break anything?
      
      (Folded in fix from KOSAKI Motohiro)
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Reviewed-by: NGrant Grundler <grundler@parisc-linux.org>
      Acked-by: NIngo Molnar <mingo@redhat.com>
      Cc: ralf@linux-mips.org
      Cc: grundler@parisc-linux.org
      Cc: jeremy@xensource.com
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      0de26520
    • R
      cpumask: centralize cpu_online_map and cpu_possible_map · 98a79d6a
      Rusty Russell 提交于
      Impact: cleanup
      
      Each SMP arch defines these themselves.  Move them to a central
      location.
      
      Twists:
      1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a
         CONFIG_INIT_ALL_POSSIBLE for this rather than break them.
      
      2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'.
         Those archs simply have phys_cpu_present_map replaced everywhere.
      
      3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky
         so I just manipulate them both in sync.
      
      4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map'
         declarations.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: NGrant Grundler <grundler@parisc-linux.org>
      Tested-by: NTony Luck <tony.luck@intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Mike Travis <travis@sgi.com>
      Cc: ink@jurassic.park.msu.ru
      Cc: rmk@arm.linux.org.uk
      Cc: starvik@axis.com
      Cc: tony.luck@intel.com
      Cc: takata@linux-m32r.org
      Cc: ralf@linux-mips.org
      Cc: grundler@parisc-linux.org
      Cc: paulus@samba.org
      Cc: schwidefsky@de.ibm.com
      Cc: lethal@linux-sh.org
      Cc: wli@holomorphy.com
      Cc: davem@davemloft.net
      Cc: jdike@addtoit.com
      Cc: mingo@redhat.com
      98a79d6a
  7. 27 11月, 2008 2 次提交
    • K
      parisc: struct device - replace bus_id with dev_name(), dev_set_name() · 90f67130
      Kay Sievers 提交于
      (I did not compile or test it, please let me know, or help fixing
       it, if something is wrong with the conversion)
      
      This patch is part of a larger patch series which will remove
      the "char bus_id[20]" name string from struct device. The device
      name is managed in the kobject anyway, and without any size
      limitation, and just needlessly copied into "struct device".
      
      To set and read the device name dev_name(dev) and dev_set_name(dev)
      must be used. If your code uses static kobjects, which it shouldn't
      do, "const char *init_name" can be used to statically provide the
      name the registered device should have. At registration time, the
      init_name field is cleared, to enforce the use of dev_name(dev) to
      access the device name at a later time.
      
      We need to get rid of all occurrences of bus_id in the entire tree
      to be able to enable the new interface. Please apply this patch,
      and possibly convert any remaining remaining occurrences of bus_id.
      
      We want to submit a patch to -next, which will remove bus_id from
      "struct device", to find the remaining pieces to convert, and finally
      switch over to the new api, which will remove the 20 bytes array
      and does no longer have a size limitation.
      
      Thanks,
      Kay
      
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: linux-parisc@vger.kernel.org
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      90f67130
    • H
      parisc: fix kernel crash when unwinding a userspace process · 7a3f5134
      Helge Deller 提交于
      Any user on existing parisc 32- and 64bit-kernels can easily crash
      the kernel and as such enforce a DSO.
      A simple testcase is available here:
              http://gsyprf10.external.hp.com/~deller/crash.tgz
      
      The problem is introduced by the fact, that the handle_interruption()
      crash handler calls the show_regs() function, which in turn tries to
      unwind the stack by calling parisc_show_stack().  Since the stack contains
      userspace addresses, a try to unwind the stack is dangerous and useless
      and leads to the crash.
      
      The fix is trivial: For userspace processes
      a) avoid to unwind the stack, and
      b) avoid to resolve userspace addresses to kernel symbol names.
      
      While touching this code, I converted print_symbol() to %pS
      printk formats and made parisc_show_stack() static.
      
      An initial patch for this was written by Kyle McMartin back in August:
      http://marc.info/?l=linux-parisc&m=121805168830283&w=2
      
      Compile and run-tested with a 64bit parisc kernel.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Cc: Grant Grundler <grundler@parisc-linux.org>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x, 2.6.27.x, earlier...]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      7a3f5134
  8. 21 11月, 2008 1 次提交
    • H
      parisc: fix bug in compat_arch_ptrace · ed79b86d
      Helge Deller 提交于
      Commit 81e192d6 ("parisc: convert to
      generic compat_sys_ptrace") introduced a bug which segfaults the parisc
      64bit kernel when stracing 32bit applications:
      
        Kernel Fault: Code=15 regs=00000000bafa42b0 (Addr=00000001baf5ab57)
             YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
        PSW: 00001000000001101111111100001011 Tainted: G        W
        r00-03  000000ff0806ff0b 000000004068edc0 00000000401203f8 00000000fb3e2508
        r04-07  0000000040686dc0 00000000baf5a800 fffffffffffffffc fffffffffb3e2508
        r08-11  00000000baf5a800 000000000004b068 00000000000402b0 0000000000040d68
        r12-15  0000000000042a9c 0000000000040a9c 0000000000040d60 0000000000042e9c
        r16-19  000000000004b060 000000000004b058 0000000000042d9c ffffffffffffffff
        r20-23  000000000800000b 0000000000000000 000000000800000b fffffffffb3e2508
        r24-27  00000000fffffffc 0000000000000003 00000000fffffffc 0000000040686dc0
        r28-31  00000001baf5a7ff 00000000bafa4280 00000000bafa42b0 00000000000001d7
        sr00-03  0000000000fca000 0000000000000000 0000000000000000 0000000000fca000
        sr04-07  0000000000000000 0000000000000000 0000000000000000 0000000000000000
      
        IASQ: 0000000000000000 0000000000000000 IAOQ: 0000000040120400 0000000040120404
         IIR: 4b9a06b0    ISR: 0000000000000000  IOR: 00000001baf5ab57
         CPU:        0   CR30: 00000000bafa4000 CR31: 00000000d22344e0
         ORIG_R28: 00000000fb3e2248
         IAOQ[0]: compat_arch_ptrace+0xb8/0x160
         IAOQ[1]: compat_arch_ptrace+0xbc/0x160
         RP(r2): compat_arch_ptrace+0xb0/0x160
        Backtrace:
         [<00000000401612ac>] compat_sys_ptrace+0x15c/0x180
         [<0000000040104ef8>] syscall_exit+0x0/0x14
      
      The problem is that compat_arch_ptrace() enters with an addr value of
      type compat_ulong_t and calls translate_usr_offset() to translate the
      address offset into a struct pt_regs offset like this:
      
      	addr = translate_usr_offset(addr)
      
      this means that any return value of translate_usr_offset() is stored
      back as compat_ulong_t type into the addr variable.
      
      But since translate_usr_offset() returns -1 for invalid offsets, addr
      can now get the value 0xffffffff which then fails the next return-value
      sanity check and thus the kernel tries to access invalid memory:
      
      	if (addr < 0)
      		break;
      
      Fix this bug by modifying translate_usr_offset() to take and return
      values of type compat_ulong_t, and by returning the value
      "sizeof(struct pt_regs)" as an error indicator.
      
      Additionally change the sanity check to check for return values
      for >= sizeof(struct pt_regs).
      
      This patch survived my compile and run-tests.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ed79b86d
  9. 14 11月, 2008 1 次提交
  10. 18 10月, 2008 1 次提交
  11. 17 10月, 2008 2 次提交
    • C
      compat: generic compat get/settimeofday · b418da16
      Christoph Hellwig 提交于
      Nothing arch specific in get/settimeofday.  The details of the timeval
      conversion varied a little from arch to arch, but all with the same
      results.
      
      Also add an extern declaration for sys_tz to linux/time.h because externs
      in .c files are fowned upon.  I'll kill the externs in various other files
      in a sparate patch.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Acked-by: David S. Miller <davem@davemloft.net> [ sparc bits ]
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Acked-by: NKyle McMartin <kyle@mcmartin.ca>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Grant Grundler <grundler@parisc-linux.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b418da16
    • C
      compat: move cp_compat_stat to common code · f7a5000f
      Christoph Hellwig 提交于
      struct stat / compat_stat is the same on all architectures, so
      cp_compat_stat should be, too.
      
      Turns out it is, except that various architectures have slightly and some
      high2lowuid/high2lowgid or the direct assignment instead of the
      SET_UID/SET_GID that expands to the correct one anyway.
      
      This patch replaces the arch-specific cp_compat_stat implementations with
      a common one based on the x86-64 one.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Acked-by: David S. Miller <davem@davemloft.net> [ sparc bits ]
      Acked-by: Kyle McMartin <kyle@mcmartin.ca> [ parisc bits ]
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f7a5000f
  12. 16 10月, 2008 1 次提交
  13. 11 10月, 2008 7 次提交
  14. 10 9月, 2008 1 次提交
  15. 03 7月, 2008 1 次提交
  16. 26 6月, 2008 2 次提交
  17. 13 6月, 2008 4 次提交
  18. 25 5月, 2008 1 次提交
  19. 17 5月, 2008 1 次提交