1. 26 Jan, 2009 3 commits
    • Rakib Mullick's avatar
      x86: fix section mismatch warning · 659d2618
      Rakib Mullick authored
      
      
      Here function vmi_activate calls a init function activate_vmi , which
      causes the following section mismatch warnings:
      
        LD      arch/x86/kernel/built-in.o
      WARNING: arch/x86/kernel/built-in.o(.text+0x13ba9): Section mismatch
      in reference from the function vmi_activate() to the function
      .init.text:vmi_time_init()
      The function vmi_activate() references
      the function __init vmi_time_init().
      This is often because vmi_activate lacks a __init
      annotation or the annotation of vmi_time_init is wrong.
      
      WARNING: arch/x86/kernel/built-in.o(.text+0x13bd1): Section mismatch
      in reference from the function vmi_activate() to the function
      .devinit.text:vmi_time_bsp_init()
      The function vmi_activate() references
      the function __devinit vmi_time_bsp_init().
      This is often because vmi_activate lacks a __devinit
      annotation or the annotation of vmi_time_bsp_init is wrong.
      
      WARNING: arch/x86/kernel/built-in.o(.text+0x13bdb): Section mismatch
      in reference from the function vmi_activate() to the function
      .devinit.text:vmi_time_ap_init()
      The function vmi_activate() references
      the function __devinit vmi_time_ap_init().
      This is often because vmi_activate lacks a __devinit
      annotation or the annotation of vmi_time_ap_init is wrong.
      
      Fix it by marking vmi_activate() as __init too.
      Signed-off-by: default avatarRakib Mullick <rakib.mullick@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      659d2618
    • Ingo Molnar's avatar
      x86: unmask CPUID levels on Intel CPUs, fix · 99fb4d34
      Ingo Molnar authored
      
      
      Impact: fix boot hang on pre-model-15 Intel CPUs
      
      rdmsrl_safe() does not work in very early bootup code yet, because we
      dont have the pagefault handler installed yet so exception section
      does not get parsed. rdmsr_safe() will just crash and hang the bootup.
      
      So limit the MSR_IA32_MISC_ENABLE MSR read to those CPU types that
      support it.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      99fb4d34
    • Eric Anholt's avatar
      x86: work around PAGE_KERNEL_WC not getting WC in iomap_atomic_prot_pfn. · ef5fa0ab
      Eric Anholt authored
      
      
      In the absence of PAT, PAGE_KERNEL_WC ends up mapping to a memory type that
      gets UC behavior even in the presence of a WC MTRR covering the area in
      question.  By swapping to PAGE_KERNEL_UC_MINUS, we can get the actual
      behavior the caller wanted (WC if you can manage it, UC otherwise).
      
      This recovers the 40% performance improvement of using WC in the DRM
      to upload vertex data.
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      ef5fa0ab
  2. 25 Jan, 2009 1 commit
    • Ingo Molnar's avatar
      x86: use standard PIT frequency · e1b4d114
      Ingo Molnar authored
      
      
      the RDC and ELAN platforms use slighly different PIT clocks, resulting in
      a timex.h hack that changes PIT_TICK_RATE during build time. But if a
      tester enables any of these platform support .config options, the PIT
      will be miscalibrated on standard PC platforms.
      
      So use one frequency - in a subsequent patch we'll add a quirk to allow
      x86 platforms to define different PIT frequencies.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e1b4d114
  3. 23 Jan, 2009 6 commits
    • Peter Zijlstra's avatar
      x86, mm: fix pte_free() · 42ef73fe
      Peter Zijlstra authored
      
      
      On -rt we were seeing spurious bad page states like:
      
      Bad page state in process 'firefox'
      page:c1bc2380 flags:0x40000000 mapping:c1bc2390 mapcount:0 count:0
      Trying to fix it up, but a reboot is needed
      Backtrace:
      Pid: 503, comm: firefox Not tainted 2.6.26.8-rt13 #3
      [<c043d0f3>] ? printk+0x14/0x19
      [<c0272d4e>] bad_page+0x4e/0x79
      [<c0273831>] free_hot_cold_page+0x5b/0x1d3
      [<c02739f6>] free_hot_page+0xf/0x11
      [<c0273a18>] __free_pages+0x20/0x2b
      [<c027d170>] __pte_alloc+0x87/0x91
      [<c027d25e>] handle_mm_fault+0xe4/0x733
      [<c043f680>] ? rt_mutex_down_read_trylock+0x57/0x63
      [<c043f680>] ? rt_mutex_down_read_trylock+0x57/0x63
      [<c0218875>] do_page_fault+0x36f/0x88a
      
      This is the case where a concurrent fault already installed the PTE and
      we get to free the newly allocated one.
      
      This is due to pgtable_page_ctor() doing the spin_lock_init(&page->ptl)
      which is overlaid with the {private, mapping} struct.
      
      union {
          struct {
              unsigned long private;
              struct address_space *mapping;
          };
          spinlock_t ptl;
          struct kmem_cache *slab;
          struct page *first_page;
      };
      
      Normally the spinlock is small enough to not stomp on page->mapping, but
      PREEMPT_RT=y has huge 'spin'locks.
      
      But lockdep kernels should also be able to trigger this splat, as the
      lock tracking code grows the spinlock to cover page->mapping.
      
      The obvious fix is calling pgtable_page_dtor() like the regular pte free
      path __pte_free_tlb() does.
      
      It seems all architectures except x86 and nm10300 already do this, and
      nm10300 doesn't seem to use pgtable_page_ctor(), which suggests it
      doesn't do SMP or simply doesnt do MMU at all or something.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlsta@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: <stable@kernel.org>
      42ef73fe
    • Michael Holzheu's avatar
      [S390] Add missing compat system call wrappers. · e34a6280
      Michael Holzheu authored
      
      
      Add wrapper functions for the following compat system calls:
      * readahead
      * sendfile64
      * tkill
      * tgkill
      * keyctl
      This ensures that the high order bits of the parameter registers are correctly
      sign extended.
      Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      e34a6280
    • Heiko Carstens's avatar
      [S390] etr/stp: fix possible deadlock · 179cb81a
      Heiko Carstens authored
      
      
      Precreate stop_machine threads in case the machine supports ETR/STP.
      Otherwise we might deadlock if a time sync operation gets scheduled
      and the creation of stop_machine threads would cause disk I/O.
      This is just the minimal fix.
      The real fix would be to only precreate stop_machine threads if
      ETR/STP is actually used. But that would be a rather large and
      complicated patch.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      179cb81a
    • Heiko Carstens's avatar
      [S390] cputime: fix lowcore initialization on cpu hotplug · f9a2f797
      Heiko Carstens authored
      
      
      On (initial) cpu hotplug the lowcore values for user_timer and
      system_timer don't get initialized like they would get on each
      process schedule.
      On initial start of secondary cpus this leads to the situation
      where per thread user/system_timer values are larger than the
      corresponding contents of the lowcore. When later calculating
      time spent in user/system context the result can be negative.
      
      So for cpu hotplug we should manually initialize lowcore values.
      
      Fixes this bug:
      
      Kernel BUG at 000ec080 [verbose debug info unavailable]
      fixpoint divide exception: 0009 [#1] PREEMPT SMP
      Modules linked in:
      CPU: 10 Not tainted 2.6.28 #4
      Process sysctl (pid: 975, task: 3fa752e0, ksp: 3fbebca0)
      Krnl PSW : 070c1000 800ec080 (show_stat+0x390/0x5fc)
                 R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0
      Krnl GPRS: 7fffffff fefc7ce5 3faec080 003879ae
                 00000001 01388000 7fffffff 01388000
                 00000000 00000000 0049ad50 3fbebcf8
                 01388000 002f51a8 800ec1fe 3fbebcf8
      Krnl Code: 800ec076: 9001b188           stm     %r0,%r1,392(%r11)
                 800ec07a: 9801b0c0           lm      %r0,%r1,192(%r11)
                 800ec07e: 1d05               dr      %r0,%r5
                >800ec080: 9001b0c0           stm     %r0,%r1,192(%r11)
                 800ec084: 5860b0c4           l       %r6,196(%r11)
                 800ec088: 1806               lr      %r0,%r6
                 800ec08a: 8c800001           srdl    %r8,1
                 800ec08e: 1d87               dr      %r8,%r7
      Call Trace:
      ([<00000000000ec1ee>] show_stat+0x4fe/0x5fc)
       [<00000000000c13e8>] seq_read+0xc4/0x3ac
       [<00000000000e4796>] proc_reg_read+0x6e/0x9c
       [<00000000000a6a44>] vfs_read+0x78/0x100
       [<00000000000a6ba8>] sys_read+0x40/0x80
       [<00000000000234a8>] sysc_do_restart+0x1a/0x1e
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      f9a2f797
    • Michael Holzheu's avatar
      [S390] fix compat sigaltstack syscall table entry · e9a4e9d5
      Michael Holzheu authored
      
      
      When 31 bit user space programs call sigaltstack on a 64 bit Linux
      OS, the system call returns -1 with errno=EFAULT. The 31 bit pointer passed
      to the system call is extended to 64 bit, but the high order bits are not
      set to zero. The kernel detects the invalid user space pointer and
      returns -EFAULT. To solve the problem, sys32_sigaltstack_wrapper()
      instead of sys32_sigaltstack() has to be called. The wrapper function sets
      the high order bits to zero.
      Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      e9a4e9d5
    • Heiko Carstens's avatar
      [S390] personality: fix personality loss on execve · 03e4c49f
      Heiko Carstens authored
      
      
      Use the personality() macro to mask out all bits that are not
      relevant for the personality type.
      The personality field contains bits for other things as well,
      so without masking out the not relevalent bits the comparison
      won't do what is expected.
      Reported-by: default avatarAndreas Krebbel <krebbel@linux.vnet.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      03e4c49f
  4. 22 Jan, 2009 2 commits
  5. 21 Jan, 2009 24 commits
  6. 19 Jan, 2009 4 commits
    • Gary Hade's avatar
      x86: remove kernel_physical_mapping_init() from init section · f5495506
      Gary Hade authored
      
      
      Impact: fix crash with memory hotplug enabled
      
      kernel_physical_mapping_init() is called during memory hotplug
      so it does not belong in the init section.
      
      If the kernel is built with CONFIG_DEBUG_SECTION_MISMATCH=y on
      the make command line, arch/x86/mm/init_64.c is compiled with
      the -fno-inline-functions-called-once gcc option defeating
      inlining of kernel_physical_mapping_init() within init_memory_mapping().
      
      When kernel_physical_mapping_init() is not inlined it is placed
      in the .init.text section according to the __init in it's current
      declaration.  A later call to kernel_physical_mapping_init() during
      a memory hotplug operation encounters an int3 trap because the
      .init.text section memory has been freed.
      
      This patch eliminates the crash caused by the int3 trap by moving the
      non-inlined kernel_physical_mapping_init() from .init.text to .meminit.text.
      Signed-off-by: default avatarGary Hade <garyhade@us.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f5495506
    • Ingo Molnar's avatar
      fix: crash: IP: __bitmap_intersects+0x48/0x73 · bfa318ad
      Ingo Molnar authored
      
      
      -tip testing found this crash:
      
      > [   35.258515] calling  acpi_cpufreq_init+0x0/0x127 @ 1
      > [   35.264127] BUG: unable to handle kernel NULL pointer dereference at (null)
      > [   35.267554] IP: [<ffffffff80478092>] __bitmap_intersects+0x48/0x73
      > [   35.267554] PGD 0
      > [   35.267554] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
      
      arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c is still broken: there's no
      allocation of the variable mask, so we pass in an uninitialized cmd.mask
      field to drv_read(), which then passes it to the scheduler which then
      crashes ...
      
      Switch it over to the much simpler constant-cpumask-pointers approach.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bfa318ad
    • Guennadi Liakhovetski's avatar
      i.MX31: Image Processing Unit DMA and IRQ drivers · 5296b56d
      Guennadi Liakhovetski authored
      
      
      i.MX3x SoCs contain an Image Processing Unit, consisting of a Control
      Module (CM), Display Interface (DI), Synchronous Display Controller (SDC),
      Asynchronous Display Controller (ADC), Image Converter (IC), Post-Filter
      (PF), Camera Sensor Interface (CSI), and an Image DMA Controller (IDMAC).
      CM contains, among other blocks, an Interrupt Generator (IG) and a Clock
      and Reset Control Unit (CRCU). This driver serves IDMAC and IG. They are
      supported over dmaengine and irq-chip APIs respectively.
      
      IDMAC is a specialised DMA controller, its DMA channels cannot be used for
      general-purpose operations, even though it might be possible to configure
      a memory-to-memory channel for memcpy operation. This driver will not work
      with generic dmaengine clients, clients, wishing to use it must use
      respective wrapper structures, they also must specify which channels they
      require, as channels are hard-wired to specific IPU functions.
      Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarGuennadi Liakhovetski <lg@denx.de>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      5296b56d
    • Mike Travis's avatar
      cpufreq: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write · 72859081
      Mike Travis authored
      Impact: use new work_on_cpu function to reduce stack usage
      
      Replace the saving of current->cpus_allowed and set_cpus_allowed_ptr() with
      a work_on_cpu function for drv_read() and drv_write().
      
      Basically converts do_drv_{read,write} into "work_on_cpu" functions that
      are now called by drv_read and drv_write.
      
      Note: This patch basically reverts 50c668d6 which reverted 7503bfba
      
      , now
      that the work_on_cpu() function is more stable.
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Tested-by: default avatarDieter Ries <clip2@gmx.de>
      Tested-by: default avatarMaciej Rutecki <maciej.rutecki@gmail.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: <cpufreq@vger.kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      72859081