1. 01 12月, 2008 21 次提交
  2. 27 11月, 2008 11 次提交
    • M
      a730b327
    • J
      x86: always define DECLARE_PCI_UNMAP* macros · b627c8b1
      Joerg Roedel 提交于
      Impact: fix boot crash on AMD IOMMU if CONFIG_GART_IOMMU is off
      
      Currently these macros evaluate to a no-op except the kernel is compiled
      with GART or Calgary support. But we also need these macros when we have
      SWIOTLB, VT-d or AMD IOMMU in the kernel. Since we always compile at
      least with SWIOTLB we can define these macros always.
      
      This patch is also for stable backport for the same reason the SWIOTLB
      default selection patch is.
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b627c8b1
    • M
      abd94219
    • H
      [S390] Fix alignment of initial kernel stack. · 0778dc3a
      Heiko Carstens 提交于
      We need an alignment of 16384 bytes for the initial kernel stack if
      the kernel is configured for 16384 bytes stacks but the linker script
      currently guarantees only an alignment of 8192 bytes.
      
      So fix this and simply use THREAD_SIZE as alignment value which will
      always do the right thing.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0778dc3a
    • C
      [S390] pgtable.h: Fix oops in unmap_vmas for KVM processes · 2944a5c9
      Christian Borntraeger 提交于
      When running several kvm processes with lots of memory overcommitment,
      we have seen an oops during process shutdown:
      ------------[ cut here ]------------
      Kernel BUG at 0000000000193434 [verbose debug info unavailable]
      addressing exception: 0005 [#1] PREEMPT SMP
      Modules linked in: kvm sunrpc qeth_l2 dm_mod qeth ccwgroup
      CPU: 10 Not tainted 2.6.28-rc4-kvm-bigiron-00521-g0ccca08-dirty #8
      Process kuli (pid: 14460, task: 0000000149822338, ksp: 0000000024f57650)
      Krnl PSW : 0704e00180000000 0000000000193434 (unmap_vmas+0x884/0xf10)
      R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 EA:3
      Krnl GPRS: 0000000000000002 0000000000000000 000000051008d000 000003e05e6034e0
                 00000000001933f6 00000000000001e9 0000000407259e0a 00000002be88c400
                 00000200001c1000 0000000407259608 0000000407259e08 0000000024f577f0
                 0000000407259e09 0000000000445fa8 00000000001933f6 0000000024f577f0
      Krnl Code: 0000000000193426: eb22000c000d sllg %r2,%r2,12
                 000000000019342c: a7180000 lhi %r1,0
                 0000000000193430: b2290012 iske %r1,%r2
                >0000000000193434: a7110002 tmll %r1,2
                 0000000000193438: a7840006 brc 8,193444
                 000000000019343c: 9602c000 oi 0(%r12),2
                 0000000000193440: 96806000 oi 0(%r6),128
                 0000000000193444: a7110004 tmll %r1,4
      Call Trace:
      ([<00000000001933f6>] unmap_vmas+0x846/0xf10)
      [<0000000000199680>] exit_mmap+0x210/0x458
      [<000000000012a8f8>] mmput+0x54/0xfc
      [<000000000012f714>] exit_mm+0x134/0x144
      [<000000000013120c>] do_exit+0x240/0x878
      [<00000000001318dc>] do_group_exit+0x98/0xc8
      [<000000000013e6b0>] get_signal_to_deliver+0x30c/0x358
      [<000000000010bee0>] do_signal+0xec/0x860
      [<0000000000112e30>] sysc_sigpending+0xe/0x22
      [<000002000013198a>] 0x2000013198a
      INFO: lockdep is turned off.
      Last Breaking-Event-Address:
      [<00000000001a68d0>] free_swap_and_cache+0x1a0/0x1a4
      <4>---[ end trace bc19f1d51ac9db7c ]---
      
      The faulting instruction is the storage key operation (iske) in
      ptep_rcp_copy (called by pte_clear, called by unmap_vmas). iske
      reads dirty and reference bit information for a physical page and
      requires a valid physical address. Since we are in pte_clear, we
      cannot rely on the pte containing a valid address. Fortunately we
      dont need these information in pte_clear - after all there is no
      mapping. The best fix is to remove the needless call to ptep_rcp_copy
      that contains the iske.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      2944a5c9
    • C
      [S390] fix/cleanup sched_clock · 8107d829
      Christian Borntraeger 提交于
      CONFIG_PRINTK_TIME reveals that sched_clock has a wrong offset during boot:
      ..
      [    0.000000]   Movable zone: 0 pages used for memmap
      [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 775679
      [    0.000000] Kernel command line: dasd=4b6c root=/dev/dasda1 ro noinitrd
      [    0.000000] PID hash table entries: 4096 (order: 12, 32768 bytes)
      [6920575.975232] console [ttyS0] enabled
      [6920575.987586] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
      [6920575.991404] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
      ..
      
      The s390 implementation of sched_clock uses the store clock instruction and
      subtracts jiffies_timer_cc.
      jiffies_timer_cc is a local variable in arch/s390/kernel/time.c and only used
      for sched_clock and monotonic clock. For historical reasons there is an offset
      on that value. With todays code this offset is unnecessary. By removing that
      offset we can get a sched_clock which returns the nanoseconds after time_init.
      This improves CONFIG_PRINTK_TIME.
      
      Since sched_clock is the only user, I have also renamed jiffies_timer_cc to
      sched_clock_base_cc. In addition, the local variable init_timer_cc is redundant
      and can be romved as well.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      8107d829
    • M
      [S390] fix system call parameter functions. · 59da2139
      Martin Schwidefsky 提交于
      syscall_get_nr() currently returns a valid result only if the call
      chain of the traced process includes do_syscall_trace_enter(). But
      collect_syscall() can be called for any sleeping task, the result of
      syscall_get_nr() in general is completely bogus.
      
      To make syscall_get_nr() work for any sleeping task the traps field
      in pt_regs is replace with svcnr - the system call number the process
      is executing. If svcnr == 0 the process is not on a system call path.
      
      The syscall_get_arguments and syscall_set_arguments use regs->gprs[2]
      for the first system call parameter. This is incorrect since gprs[2]
      may have been overwritten with the system call number if the call
      chain includes do_syscall_trace_enter. Use regs->orig_gprs2 instead.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      59da2139
    • T
      ARM: OMAP: Fixes for suspend / resume GPIO wake-up handling · 723fdb78
      Tero Kristo 提交于
      Use the correct wake-up enable register, and make it
      work with 34xx also.
      Signed-off-by: NTero Kristo <tero.kristo@nokia.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      723fdb78
    • 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
    • G
      parisc: __kernel_time_t is always long · 9860d1b0
      Geert Uytterhoeven 提交于
      __kernel_time_t is always long on PA-RISC, irrespective of CONFIG_64BIT,
      hence move it out of the #ifdef CONFIG_64BIT / #else / #endif block.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      9860d1b0
  3. 26 11月, 2008 8 次提交
    • E
    • G
      [ARM] pxa/pcm990: use negative number for an invalid GPIO in camera data · 72e9622c
      Guennadi Liakhovetski 提交于
      0 is a valid GPIO number, use a negative number to specify, that this camera
      doesn't have a GPIO for bus-width switching.
      Signed-off-by: NGuennadi Liakhovetski <lg@denx.de>
      Signed-off-by: NEric Miao <eric.miao@marvell.com>
      72e9622c
    • A
      x86: fixup config space size of CPU functions for AMD family 11h · ffd565a8
      Andreas Herrmann 提交于
      Impact: extend allowed configuration space access on 11h CPUs from 256 to 4K
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ffd565a8
    • A
      ARM: OMAP: Typo fix for clock_allow_idle · 147dcf54
      Amit Kucheria 提交于
      The second clk_deny_idle instance should be clk_allow_idle instead.
      Signed-off-by: NAmit Kucheria <amit.kucheria@verdurent.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      147dcf54
    • A
      [CPUFREQ] powernow-k8: ignore out-of-range PstateStatus value · a266d9f1
      Andreas Herrmann 提交于
      A workaround for AMD CPU family 11h erratum 311 might cause that the
      P-state Status Register shows a "current P-state" which is larger than
      the "current P-state limit" in P-state Current Limit Register. For the
      wrong P-state value there is no ACPI _PSS object defined and
      powernow-k8/cpufreq can't determine the proper CPU frequency for that
      state.
      
      As a consequence this can cause a panic during boot (potentially with
      all recent kernel versions -- at least I have reproduced it with
      various 2.6.27 kernels and with the current .28 series), as an
      example:
      
      powernow-k8: Found 1 AMD Turion(tm)X2 Ultra DualCore Mobile ZM-82 processors (2 \
      )
      powernow-k8:    0 : pstate 0 (2200 MHz)
      powernow-k8:    1 : pstate 1 (1100 MHz)
      powernow-k8:    2 : pstate 2 (600 MHz)
      BUG: unable to handle kernel paging request at ffff88086e7528b8
      IP: [<ffffffff80486361>] cpufreq_stats_update+0x4a/0x5f
      PGD 202063 PUD 0
      Oops: 0002 [#1] SMP
      last sysfs file:
      CPU 1
      Modules linked in:
      Pid: 1, comm: swapper Not tainted 2.6.28-rc3-dirty #16
      RIP: 0010:[<ffffffff80486361>]  [<ffffffff80486361>] cpufreq_stats_update+0x4a/0\
      f
      Synaptics claims to have extended capabilities, but I'm not able to read them.<6\
      6
      RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff88006e7528c0
      RDX: 00000000ffffffff RSI: ffff88006e54af00 RDI: ffffffff808f056c
      RBP: 00000000fffee697 R08: 0000000000000003 R09: ffff88006e73f080
      R10: 0000000000000001 R11: 00000000002191c0 R12: ffff88006fb83c10
      R13: 00000000ffffffff R14: 0000000000000001 R15: 0000000000000000
      FS:  0000000000000000(0000) GS:ffff88006fb50740(0000) knlGS:0000000000000000
      Unable to initialize Synaptics hardware.
      CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      CR2: ffff88086e7528b8 CR3: 0000000000201000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process swapper (pid: 1, threadinfo ffff88006fb82000, task ffff88006fb816d0)
      Stack:
       ffff88006e74da50 0000000000000000 ffff88006e54af00 ffffffff804863c7
       ffff88006e74da50 0000000000000000 00000000ffffffff 0000000000000000
       ffff88006fb83c10 ffffffff8024b46c ffffffff808f0560 ffff88006fb83c10
      Call Trace:
       [<ffffffff804863c7>] ? cpufreq_stat_notifier_trans+0x51/0x83
       [<ffffffff8024b46c>] ? notifier_call_chain+0x29/0x4c
       [<ffffffff8024b561>] ? __srcu_notifier_call_chain+0x46/0x61
       [<ffffffff8048496d>] ? cpufreq_notify_transition+0x93/0xa9
       [<ffffffff8021ab8d>] ? powernowk8_target+0x1e8/0x5f3
       [<ffffffff80486687>] ? cpufreq_governor_performance+0x1b/0x20
       [<ffffffff80484886>] ? __cpufreq_governor+0x71/0xa8
       [<ffffffff80484b21>] ? __cpufreq_set_policy+0x101/0x13e
       [<ffffffff80485bcd>] ? cpufreq_add_dev+0x3f0/0x4cd
       [<ffffffff8048577a>] ? handle_update+0x0/0x8
       [<ffffffff803c2062>] ? sysdev_driver_register+0xb6/0x10d
       [<ffffffff8056592c>] ? powernowk8_init+0x0/0x7e
       [<ffffffff8048604c>] ? cpufreq_register_driver+0x8f/0x140
       [<ffffffff80209056>] ? _stext+0x56/0x14f
       [<ffffffff802c2234>] ? proc_register+0x122/0x17d
       [<ffffffff802c23a0>] ? create_proc_entry+0x73/0x8a
       [<ffffffff8025c259>] ? register_irq_proc+0x92/0xaa
       [<ffffffff8025c2c8>] ? init_irq_proc+0x57/0x69
       [<ffffffff807fc85f>] ? kernel_init+0x116/0x169
       [<ffffffff8020cc79>] ? child_rip+0xa/0x11
       [<ffffffff807fc749>] ? kernel_init+0x0/0x169
       [<ffffffff8020cc6f>] ? child_rip+0x0/0x11
      Code: 05 c5 83 36 00 48 c7 c2 48 5d 86 80 48 8b 04 d8 48 8b 40 08 48 8b 34 02 48\
      
      RIP  [<ffffffff80486361>] cpufreq_stats_update+0x4a/0x5f
       RSP <ffff88006fb83b20>
      CR2: ffff88086e7528b8
      ---[ end trace 0678bac75e67a2f7 ]---
      Kernel panic - not syncing: Attempted to kill init!
      
      In short, aftereffect of the wrong P-state is that
      cpufreq_stats_update() uses "-1" as index for some array in
      
      cpufreq_stats_update (unsigned int cpu)
      {
      ...
           if (stat->time_in_state)
                      stat->time_in_state[stat->last_index] =
                              cputime64_add(stat->time_in_state[stat->last_index],
                                            cputime_sub(cur_time, stat->last_time));
      ...
      }
      
      Fortunately, the wrong P-state value is returned only if the core is
      in P-state 0. This fix solves the problem by detecting the
      out-of-range P-state, ignoring it, and using "0" instead.
      
      Cc: Mark Langsdorf <mark.langsdorf@amd.com>
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      a266d9f1
    • M
      x86, bts: fix wrmsr and spinlock over kmalloc · de90add3
      Markus Metzger 提交于
      Impact: fix sleeping-with-spinlock-held bugs/crashes
      
      - Turn a wrmsr to write the DS_AREA MSR into a wrmsrl.
      - Use irqsave variants of spinlocks.
      - Do not allocate memory while holding spinlocks.
      Reported-by: NStephane Eranian <eranian@googlemail.com>
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NMarkus Metzger <markus.t.metzger@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      de90add3
    • M
      x86, pebs: fix PEBS record size configuration · c4858ffc
      Markus Metzger 提交于
      Impact: fix DS hw enablement on 64-bit x86
      
      Fix the PEBS record size in the DS configuration.
      Reported-by: NStephane Eranian <eranian@googlemail.com>
      Signed-off-by: NMarkus Metzger <markus.t.metzger@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c4858ffc
    • M
      x86, bts: turn macro into static inline function · e5e8ca63
      Markus Metzger 提交于
      Impact: cleanup
      
      Replace a macro with a static inline function.
      Signed-off-by: NMarkus Metzger <markus.t.metzger@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e5e8ca63