1. 03 2月, 2007 2 次提交
  2. 31 1月, 2007 1 次提交
    • E
      [PATCH] i386: In assign_irq_vector look at all vectors before giving up · 8339f000
      Eric W. Biederman 提交于
      When the world was a simple and static place setting up irqs was easy.
      It sufficed to allocate a linux irq number and a find a free cpu
      vector we could receive that linux irq on.  In those days it was
      a safe assumption that any allocated vector was actually in use
      so after one global pass through all of the vectors we would have
      none left.
      
      These days things are much more dynamic with interrupt controllers
      (in the form of MSI or MSI-X) appearing on plug in cards and linux
      irqs appearing and disappearing.  As these irqs come and go vectors
      are allocated and freed,  invalidating the ancient assumption that all
      allocated vectors stayed in use forever.
      
      So this patch modifies the vector allocator to walk through every
      possible vector before giving up, and to check to see if a vector
      is in use before assigning it.  With these changes we stop leaking
      freed vectors and it becomes possible to allocate and free irq vectors
      all day long.
      
      This changed was modeled after the vector allocator on x86_64 where
      this limitation has already been removed.  In essence we don't update
      the static variables that hold the position of the last vector we
      allocated until have successfully allocated another vector.  This
      allows us to detect if we have completed one complete scan through
      all of the possible vectors.
      Acked-by: NAuke Kok <auke-jan.h.kok@intel.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8339f000
  3. 29 1月, 2007 1 次提交
  4. 27 1月, 2007 2 次提交
    • R
      [PATCH] i386 vDSO: use VM_ALWAYSDUMP · f47aef55
      Roland McGrath 提交于
      This patch fixes core dumps to include the vDSO vma, which is left out now.
      It removes the special-case core writing macros, which were not doing the
      right thing for the vDSO vma anyway.  Instead, it uses VM_ALWAYSDUMP in the
      vma; there is no need for the fixmap page to be installed.  It handles the
      CONFIG_COMPAT_VDSO case by making elf_core_dump use the fake vma from
      get_gate_vma after real vmas in the same way the /proc/PID/maps code does.
      
      This changes core dumps so they no longer include the non-PT_LOAD phdrs from
      the vDSO.  I made the change to add them in the first place, but in turned out
      that nothing ever wanted them there since the advent of NT_AUXV.  It's cleaner
      to leave them out, and just let the phdrs inside the vDSO image speak for
      themselves.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f47aef55
    • R
      [PATCH] Fix CONFIG_COMPAT_VDSO · a1f3bb9a
      Roland McGrath 提交于
      I wouldn't mind if CONFIG_COMPAT_VDSO went away entirely.  But if it's there,
      it should work properly.  Currently it's quite haphazard: both real vma and
      fixmap are mapped, both are put in the two different AT_* slots, sysenter
      returns to the vma address rather than the fixmap address, and core dumps yet
      are another story.
      
      This patch makes CONFIG_COMPAT_VDSO disable the real vma and use the fixmap
      area consistently.  This makes it actually compatible with what the old vdso
      implementation did.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a1f3bb9a
  5. 23 1月, 2007 3 次提交
  6. 12 1月, 2007 2 次提交
  7. 11 1月, 2007 3 次提交
    • V
      ACPI: rename cstate_entry_s to cstate_entry · 5d65131f
      Venkatesh Pallipadi 提交于
      style change only.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      5d65131f
    • V
      [PATCH] i386: Convert some functions to __init to avoid MODPOST warnings · 88d20328
      Vivek Goyal 提交于
      o Some functions which should have been in init sections as they are called
        only once. Put them in init sections. Otherwise MODPOST generates warning
        as these functions are placed in .text and they end up accessing something
        in init sections.
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:migration_init
      from .text between 'do_pre_smp_initcalls' (at offset 0xc01000d1) and
      'run_init_process'
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      88d20328
    • V
      [PATCH] i386: cpu hotplug/smpboot misc MODPOST warning fixes · 4a5d107a
      Vivek Goyal 提交于
      o Misc smpboot/cpu hotplug path cleanups. I did those to supress the
        warnings generated by MODPOST. These warnings are visible only
        if CONFIG_RELOCATABLE=y.
      
      o CONFIG_RELOCATABLE compiles the kernel with --emit-relocs option. This
        option retains relocation information in vmlinux file and MODPOST
        is quick to spit out "Section mismatch" warnings.
      
      o This patch fixes some of those warnings. Many of the functions in
        smpboot case are __devinit type and they in turn accesses text/data which
        if of type __cpuinit. Now if CONFIG_HOTPLUG=y and CONFIG_HOTPLUG_CPU=n
        then we end up in cases where a function in .text segment is calling
        another function in .init.text segment and MODPOST emits warning.
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:identify_cpu from .text between 'smp_store_cpu_info' (at offset 0xc011020d) and 'do_boot_cpu'
      WARNING: vmlinux - Section mismatch: reference to .init.text:init_gdt from .text between 'do_boot_cpu' (at offset 0xc01102ca) and '__cpu_up'
      WARNING: vmlinux - Section mismatch: reference to .init.text:print_cpu_info from .text between 'do_boot_cpu' (at offset 0xc01105d0) and '__cpu_up'
      
      o It also fixes the issues where CONFIG_HOTPLUG_CPU=y and start_secondary()
        is calling smp_callin() which in-turn calls synchronize_tsc_ap() which is
        of type __init. This should have meant broken CPU hotplug.
      
      WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'start_secondary' (at offset 0xc011603f) and 'initialize_secondary'
      WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'MP_processor_info' (at offset 0xc0116a4f) and 'mp_register_lapic'
      WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'MP_processor_info' (at offset 0xc0116a4f) and 'mp_register_lapic'
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      4a5d107a
  8. 06 1月, 2007 3 次提交
  9. 03 1月, 2007 3 次提交
  10. 02 1月, 2007 1 次提交
    • L
      ACPI: fix section mis-match build warning · e82c354b
      Len Brown 提交于
      Dunno why this pops out in only in the allmodconfig build.
      Though the warning is accurate, all the callers of the flagged
      non __init function are __init, this is not a functional change.
      
      WARNING: vmlinux - Section mismatch: reference to .init.data:acpi_sci_flags from .text between 'acpi_sci_ioapic_setup' (at offset 0xc010f0a
      6) and 'acpi_gsi_to_irq'                                                                                                                   WARNING: vmlinux - Section mismatch: reference to .init.text:mp_override_legacy_irq from .text between 'acpi_sci_ioapic_setup' (at offset 0
      xc010f0de) and 'acpi_gsi_to_irq'                                                                                                           WARNING: vmlinux - Section mismatch: reference to .init.data:acpi_sci_override_gsi from .text between 'acpi_sci_ioapic_setup' (at offset 0x
      c010f0e4) and 'acpi_gsi_to_irq'
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e82c354b
  11. 30 12月, 2006 1 次提交
    • R
      [CPUFREQ] Longhaul - Fix up powersaver assumptions. · 264166e6
      Rafa Bilski 提交于
      ACPI PM2 register was fallback for "Longhaul ver. 1" CPU's.
      My assumption that this register isn't present at
      "PowerSaver" motherboards is so far true, but current code
      will not work correctly in other case. There are three possible
      supports: ACPI C3, PM2 and northbridge. That was my assumption
      that ACPI C3 and northbridge is for PS and northbridge and PM2
      is for V1. In current code we can only check if it is ACPI
      support or not by port22_en. So remove port22_en and add
      longhaul_flags. If USE_ACPI_C3 and USE_NORTHBRIDGE are both
      clear then it means ACPI PM2 support. Also change order of
      support probe from ACPI C3, PM2, northbridge to ACPI C3,
      northbridge, ACPI PM2. Paranoid protection against port 0x22
      cast as ACPI PM2 register. Bit 1 clear in such case - lockup
      on AGP DMA. And obvious (now) fixup for do_powersaver. Use
      cx->address only for ACPI C3 ("PowerSaver" processor using
      PM2 support).
      Signed-off-by: NRafa Bilski <rafalbilski@interia.pl>
      Signed-off-by: NDave Jones <davej@redhat.com>
      264166e6
  12. 29 12月, 2006 1 次提交
  13. 23 12月, 2006 6 次提交
    • B
      [CPUFREQ] speedstep-centrino: missing space and bracket · d349c4a5
      Brice Goglin 提交于
      A space and a bracket are missing (and indentation is wrong).
      Signed-off-by: NBrice Goglin <Brice.Goglin@ens-lyon.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      d349c4a5
    • V
      [CPUFREQ] Bug fix for acpi-cpufreq and cpufreq_stats oops on frequency change notification · 8edc59d9
      Venkatesh Pallipadi 提交于
      Fixes the oops in cpufreq_stats with acpi_cpufreq driver.  The issue was
      that the frequency was reported as 0 in acpi-cpufreq.c.  The bug is due to
      different indicies for freq_table and ACPI perf table.
      
      Also adds a check in cpufreq_stats to check for error return from
      freq_table_get_index() and avoid using the error return value.
      
      Patch fixes the issue reported at
      http://www.ussg.iu.edu/hypermail/linux/kernel/0611.2/0629.html
      and also other similar issue here
      http://bugme.osdl.org/show_bug.cgi?id=7383 comment 53
      Signed-off-by: NDhaval Giani <dhaval.giani@gmail.com>
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      8edc59d9
    • I
      [PATCH] sched: fix bad missed wakeups in the i386, x86_64, ia64, ACPI and APM idle code · 0888f06a
      Ingo Molnar 提交于
      Fernando Lopez-Lezcano reported frequent scheduling latencies and audio
      xruns starting at the 2.6.18-rt kernel, and those problems persisted all
      until current -rt kernels. The latencies were serious and unjustified by
      system load, often in the milliseconds range.
      
      After a patient and heroic multi-month effort of Fernando, where he
      tested dozens of kernels, tried various configs, boot options,
      test-patches of mine and provided latency traces of those incidents, the
      following 'smoking gun' trace was captured by him:
      
                       _------=> CPU#
                      / _-----=> irqs-off
                     | / _----=> need-resched
                     || / _---=> hardirq/softirq
                     ||| / _--=> preempt-depth
                     |||| /
                     |||||     delay
         cmd     pid ||||| time  |   caller
            \   /    |||||   \   |   /
        IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup (try_to_wake_up)
        IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup <<...>-5856> (37 0)
        IRQ_19-1479  1D..1    0us : __trace_start_sched_wakeup (c01262ba 0 0)
        IRQ_19-1479  1D..1    0us : resched_task (try_to_wake_up)
        IRQ_19-1479  1D..1    0us : __spin_unlock_irqrestore (try_to_wake_up)
        ...
        <idle>-0     1...1   11us!: default_idle (cpu_idle)
        ...
        <idle>-0     0Dn.1  602us : smp_apic_timer_interrupt (c0103baf 1 0)
        ...
         <...>-5856  0D..2  618us : __switch_to (__schedule)
         <...>-5856  0D..2  618us : __schedule <<idle>-0> (20 162)
         <...>-5856  0D..2  619us : __spin_unlock_irq (__schedule)
         <...>-5856  0...1  619us : trace_stop_sched_switched (__schedule)
         <...>-5856  0D..1  619us : trace_stop_sched_switched <<...>-5856> (37 0)
      
      what is visible in this trace is that CPU#1 ran try_to_wake_up() for
      PID:5856, it placed PID:5856 on CPU#0's runqueue and ran resched_task()
      for CPU#0. But it decided to not send an IPI that no CPU - due to
      TS_POLLING. But CPU#0 never woke up after its NEED_RESCHED bit was set,
      and only rescheduled to PID:5856 upon the next lapic timer IRQ. The
      result was a 600+ usecs latency and a missed wakeup!
      
      the bug turned out to be an idle-wakeup bug introduced into the mainline
      kernel this summer via an optimization in the x86_64 tree:
      
          commit 495ab9c0
          Author: Andi Kleen <ak@suse.de>
          Date:   Mon Jun 26 13:59:11 2006 +0200
      
          [PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
      
          During some profiling I noticed that default_idle causes a lot of
          memory traffic. I think that is caused by the atomic operations
          to clear/set the polling flag in thread_info. There is actually
          no reason to make this atomic - only the idle thread does it
          to itself, other CPUs only read it. So I moved it into ti->status.
      
      the problem is this type of change:
      
              if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
      -               clear_thread_flag(TIF_POLLING_NRFLAG);
      +               current_thread_info()->status &= ~TS_POLLING;
                      smp_mb__after_clear_bit();
                      while (!need_resched()) {
                              local_irq_disable();
      
      this changes clear_thread_flag() to an explicit clearing of TS_POLLING.
      clear_thread_flag() is defined as:
      
              clear_bit(flag, &ti->flags);
      
      and clear_bit() is a LOCK-ed atomic instruction on all x86 platforms:
      
        static inline void clear_bit(int nr, volatile unsigned long * addr)
        {
                __asm__ __volatile__( LOCK_PREFIX
                        "btrl %1,%0"
      
      hence smp_mb__after_clear_bit() is defined as a simple compile barrier:
      
        #define smp_mb__after_clear_bit()       barrier()
      
      but the explicit TS_POLLING clearing introduced by the patch:
      
      +               current_thread_info()->status &= ~TS_POLLING;
      
      is not an atomic op! So the clearing of the TS_POLLING bit is freely
      reorderable with the reading of the NEED_RESCHED bit - and both now
      reside in different memory addresses.
      
      CPU idle wakeup very much depends on ordered memory ops, the clearing of
      the TS_POLLING flag must always be done before we test need_resched()
      and hit the idle instruction(s). [Symmetrically, the wakeup code needs
      to set NEED_RESCHED before it tests the TS_POLLING flag, so memory
      ordering is paramount.]
      
      Fernando's dual-core Athlon64 system has a sufficiently advanced memory
      ordering model so that it triggered this scenario very often.
      
      ( And it also turned out that the reason why these latencies never
        triggered on my testsystems is that i routinely use idle=poll, which
        was the only idle variant not affected by this bug. )
      
      The fix is to change the smp_mb__after_clear_bit() to an smp_mb(), to
      act as an absolute barrier between the TS_POLLING write and the
      NEED_RESCHED read. This affects almost all idling methods (default,
      ACPI, APM), on all 3 x86 architectures: i386, x86_64, ia64.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Tested-by: NFernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0888f06a
    • J
      [PATCH] ptrace: Fix EFL_OFFSET value according to i386 pda changes · 8701ea95
      Jeremy Fitzhardinge 提交于
      The PDA patches introduced a bug in ptrace: it reads eflags from the wrong
      place on the target's stack, but writes it back to the correct place.  The
      result is a corrupted eflags, which is most visible when it turns interrupts
      off unexpectedly.
      
      This patch fixes this by making the ptrace code a little less fragile.  It
      changes [gs]et_stack_long to take a straightforward byte offset into struct
      pt_regs, rather than requiring all callers to do a sizeof(struct pt_regs)
      offset adjustment.  This means that the eflag's offset (EFL_OFFSET) on the
      target stack can be simply computed with offsetof().
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Frederik Deweerdt <deweerdt@free.fr>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8701ea95
    • J
      [PATCH] microcode: fix mc_cpu_notifier section warning · be31f9cb
      Jean Delvare 提交于
      Structure mc_cpu_notifier references a __cpuinit function, but isn't
      declared __cpuinitdata itself:
      
      WARNING: arch/i386/kernel/microcode.o - Section mismatch: reference
      to .init.text: from .data after 'mc_cpu_notifier' (at offset 0x118)
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      be31f9cb
    • Y
      [PATCH] compile error of register_memory() · 5c95da9f
      Yasunori Goto 提交于
      register_memory() becomes double definition in 2.6.20-rc1.  It is defined
      in arch/i386/kernel/setup.c as static definition in 2.6.19.  But it is
      moved to arch/i386/kernel/e820.c in 2.6.20-rc1.  And same name function is
      defined in driver/base/memory.c too.  So, it becomes cause of compile error
      of duplicate definition if memory hotplug option is on.
      Signed-off-by: NYasunori Goto <y-goto@jp.fujitsu.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5c95da9f
  14. 18 12月, 2006 3 次提交
  15. 16 12月, 2006 2 次提交
  16. 14 12月, 2006 4 次提交
  17. 13 12月, 2006 2 次提交