Skip to content
  1. Nov 27, 2007
    • Andreas Herrmann's avatar
      x86: correctly set UTS_MACHINE for "make ARCH=x86" · 43517854
      Andreas Herrmann authored
      
      
      x86: correctly set UTS_MACHINE for "make ARCH=x86"
      
      For a kernel built with "make ARCH=x86" the following system
      information is displayed when running the new kernel
      
          $ uname -m
          x86
      
      On some i386 systems (e.g. K7) we even have the following information
      
          $ uname -m
          x66
      
      This is weird. The usual information for "uname -m" should be "x86_64"
      on 64-bit and "i386" or "i686" on 32-bit.
      
      This patch fixes the issue by setting UTS_MACHINE to "i386" for 32-bit
      kernel builds and to "x86_64" for 64-bit kernel builds. I.e., "x86"
      won't be used for UTS_MACHINE anymore.
      
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarAndreas Herrmann <aherrman@arcor.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@redhat.com>
      43517854
    • Peter Zijlstra's avatar
      lockdep: annotate do_debug() trap handler · 000f4a9e
      Peter Zijlstra authored
      
      
      Ensure the hardirq state is consistent before using locks. Use the rare
      trace_hardirqs_fixup() because the trap can happen in any context.
      
      resolves this rare lockdep warning:
      
      WARNING: at kernel/lockdep.c:2658 check_flags()
       [<c013571e>] check_flags+0x90/0x140
       [<c0138a69>] lock_release+0x4b/0x1d0
       [<c0507fea>] notifier_call_chain+0x2a/0x47
       [<c050806b>] __atomic_notifier_call_chain+0x64/0x6d
       [<c0508007>] __atomic_notifier_call_chain+0x0/0x6d
       [<c050808b>] atomic_notifier_call_chain+0x17/0x1a
       [<c0131802>] notify_die+0x30/0x34
       [<c0506b09>] do_debug+0x3e/0xd4
       [<c050658f>] debug_stack_correct+0x27/0x2c
       [<c04be389>] tcp_rcv_established+0x1/0x620
       [<c04c38c2>] tcp_v4_do_rcv+0x2b/0x313
       [<c04c56b6>] tcp_v4_rcv+0x467/0x85d
       [<c0505ff2>] _spin_lock_nested+0x27/0x32
       [<c04c5a4d>] tcp_v4_rcv+0x7fe/0x85d
       [<c04c560e>] tcp_v4_rcv+0x3bf/0x85d
       [<c04adbb5>] ip_local_deliver_finish+0x11b/0x1b0
       [<c04adac8>] ip_local_deliver_finish+0x2e/0x1b0
       [<c04ada7b>] ip_rcv_finish+0x27b/0x29a
       [<c04961e5>] netif_receive_skb+0xfb/0x2a6
       [<c04add0f>] ip_rcv+0x0/0x1fb
       [<c0496354>] netif_receive_skb+0x26a/0x2a6
       [<c04961e5>] netif_receive_skb+0xfb/0x2a6
       [<c049872e>] process_backlog+0x7f/0xc6
       [<c04983ba>] net_rx_action+0xb9/0x1ac
       [<c0498348>] net_rx_action+0x47/0x1ac
       [<c01376cb>] trace_hardirqs_on+0x118/0x16b
       [<c01225e2>] __do_softirq+0x49/0xa2
       [<c010595f>] do_softirq+0x60/0xdd
       [<c0506300>] _spin_unlock_irq+0x20/0x2c
       [<c0103e4f>] restore_nocheck+0x12/0x15
       [<c01440e1>] handle_fasteoi_irq+0x0/0x9b
       [<c0105a70>] do_IRQ+0x94/0xaa
       [<c0506300>] _spin_unlock_irq+0x20/0x2c
       [<c0104832>] common_interrupt+0x2e/0x34
       [<c0114703>] native_safe_halt+0x2/0x3
       [<c0102c01>] default_idle+0x44/0x65
       [<c010257f>] cpu_idle+0x42/0x50
       [<c076ea09>] start_kernel+0x26b/0x270
       [<c076e317>] unknown_bootoption+0x0/0x196
       =======================
      irq event stamp: 559190
      hardirqs last  enabled at (559190): [<c0507316>] kprobe_exceptions_notify+0x299/0x305
      hardirqs last disabled at (559189): [<c05067bf>] do_int3+0x1d/0x95
      softirqs last  enabled at (559172): [<c010595f>] do_softirq+0x60/0xdd
      softirqs last disabled at (559181): [<c010595f>] do_softirq+0x60/0xdd
      
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      000f4a9e
    • Ingo Molnar's avatar
      x86: turn off iommu merge by default · bc84cf17
      Ingo Molnar authored
      revert this commit for now:
      
          commit 94806268
          Author: Andi Kleen <ak@suse.de>
          Date:   Fri Oct 19 20:35:03 2007 +0200
      
              x86: enable iommu_merge by default
      
      it's causing regressions:
      
          http://bugzilla.kernel.org/show_bug.cgi?id=9412
      
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      bc84cf17
    • Thomas Gleixner's avatar
      x86: fix ACPI compile for LOCAL_APIC=n · aafab10d
      Thomas Gleixner authored
      
      
      ACPI processor idle code references local_apic_timer_c2_ok, which
      is not available when LOCAL_APIC is disabled.
      
      Define local_apic_timer_c2_ok as a constant, when LOCAL_APIC=n
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      aafab10d
    • Arjan van de Ven's avatar
      x86: printk kernel version in WARN_ON and other dump_stack users · 57c351de
      Arjan van de Ven authored
      
      
      today, all oopses contain a version number of the kernel, which is nice
      because the people who actually do bother to read the oops get this
      vital bit of information always without having to ask the reporter in
      another round trip.
      
      However, WARN_ON() and many other dump_stack() users right now lack this
      information; the patch below adds this. This information is essential
      for getting people to use their time effectively when looking at these
      things; in addition, it's essential for tools that try to collect
      statistics about defects.
      
      Please consider, since its so simple and important for long term kernel
      quality processes.
      
      The code is identical between 32/64 bit; a lot of this code should be
      unified over time, the patch keeps the identical-ness intact.
      
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      57c351de
    • Alexey Starikovskiy's avatar
      ACPI: Set max_cstate to 1 for early Opterons. · c1c30634
      Alexey Starikovskiy authored
      AMD Opteron processors before CG revision don't like C-states > 1.
      
      This solves the long standing bugzilla #5303 and probably some more
      on affected machines:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=5303
      
      
      
      [ tglx@linutronix.de: reworked the patch so it does not wreck ia64 ]
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c1c30634
    • Maciej W. Rozycki's avatar
      x86: fix NMI watchdog & 'stopped time' problem · d4d25dec
      Maciej W. Rozycki authored
      More than 3 years ago Niclas Gustafsson reported a 'stopped time'
      problem:
      
      > Watching the /proc/interrupts with 10s apart after the "stop".
      >
      > [root@s151 root]# more /proc/interrupts
      >            CPU0
      >   0:   66413955  local-APIC-edge  timer
      [...]
      > LOC:   67355837
      > ERR:          0
      > MIS:          0
      > [root@s151 root]# more /proc/interrupts
      >            CPU0
      >   0:   66413955  local-APIC-edge  timer
      [...]
      > LOC:   67379568
      > ERR:          0
      > MIS:          0
      
      This may be because buggy SMM firmware messes with the 8259A (configured
      for a transparent mode -- yes that rare "local-APIC-edge" mode is tricky
      ;-) ) insanely.
      
      this should resolve:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=2544
        http://bugzilla.kernel.org/show_bug.cgi?id=6296
      
      
      
      Patch-dusted-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      d4d25dec
  2. Nov 18, 2007
    • Linus Torvalds's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 · 2ffbb837
      Linus Torvalds authored
      * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
        x86: simplify "make ARCH=x86" and fix kconfig all.config
        x86: reboot fixup for wrap2c board
        x86: check boundary in count setup resource
        x86: fix reboot with no keyboard attached
        x86: add hpet sanity checks
        x86: on x86_64, correct reading of PC RTC when update in progress in time_64.c
        x86: fix freeze in x86_64 RTC update code in time_64.c
        ntp: fix typo that makes sync_cmos_clock erratic
        Remove x86 merge artifact from top Makefile
        x86: fixup cpu_info array conversion
        x86: show cpuinfo only for online CPUs
        x86: fix cpu-hotplug regression
        x86: ignore the sys_getcpu() tcache parameter
        x86: voyager use correct header file name
        x86: fix smp init sections
        x86: fix voyager_cat_init section
        x86: fix bogus memcpy in es7000_check_dsdt()
      2ffbb837
    • Sam Ravnborg's avatar
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 6840999b
      Sam Ravnborg authored
      Simplify "make ARCH=x86" and fix kconfig so we again can set 64BIT in
      all.config.
      
      For a fix the diffstat is nice:
       6 files changed, 3 insertions(+), 36 deletions(-)
      
      The patch reverts these commits:
       - 0f855aa6 ("kconfig: add helper to set
         config symbol from environment variable")
       - 2a113281
      
       ("kconfig: use $K64BIT to
         set 64BIT with all*config targets")
      
      Roman Zippel pointed out that kconfig supported string compares so
      the additional complexity introduced by the above two patches were
      not needed.
      
      With this patch we have following behaviour:
      
        # make {allno,allyes,allmod,rand}config [ARCH=...]
        option \ host arch      | 32bit         | 64bit
        =====================================================
        ./.                     | 32bit         | 64bit
        ARCH=x86                | 32bit         | 32bit
        ARCH=i386               | 32bit         | 32bit
        ARCH=x86_64             | 64bit         | 64bit
      
      The general rule are that ARCH= and native architecture takes
      precedence over the configuration.
      
      So make ARCH=i386 [whatever] will always build a 32-bit kernel
      no matter what the configuration says.  The configuration will
      be updated to 32-bit if it was configured to 64-bit and the
      other way around.
      
      This behaviour is consistent with previous behaviour so no
      suprises here.
      
      make ARCH=x86 will per default result in a 32-bit kernel but as
      the only ARCH= value x86 allow the user to select between 32-bit
      and 64-bit using menuconfig.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6840999b
    • Sam Ravnborg's avatar
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 80ef88d6
      Sam Ravnborg authored
      Simplify "make ARCH=x86" and fix kconfig so we again
      can set 64BIT in all.config.
      
      For a fix the diffstat is nice:
       6 files changed, 3 insertions(+), 36 deletions(-)
      
      The patch reverts these commits:
      0f855aa6
      -> kconfig: add helper to set config symbol from environment variable
      
      2a113281
      
      
      -> kconfig: use $K64BIT to set 64BIT with all*config targets
      
      Roman Zippel pointed out that kconfig supported string
      compares so the additional complexity introduced by the
      above two patches were not needed.
      
      With this patch we have following behaviour:
      
      # make {allno,allyes,allmod,rand}config [ARCH=...]
      option \ host arch      | 32bit         | 64bit
      =====================================================
      ./.                     | 32bit         | 64bit
      ARCH=x86                | 32bit         | 32bit
      ARCH=i386               | 32bit         | 32bit
      ARCH=x86_64             | 64bit         | 64bit
      
      The general rule are that ARCH= and native architecture
      takes precedence over the configuration.
      So make ARCH=i386 [whatever] will always build a 32-bit
      kernel no matter what the configuration says.
      The configuration will be updated to 32-bit if it was
      configured to 64-bit and the other way around.
      
      This behaviour is consistent with previous behaviour so
      no suprises here.
      
      make ARCH=x86 will per default result in a 32-bit kernel
      but as the only ARCH= value x86 allow the user to select
      between 32-bit and 64-bit using menuconfig. 
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      80ef88d6
  3. Nov 17, 2007
  4. Nov 16, 2007
    • Linus Torvalds's avatar
      dirty page balancing: Get rid of broken unmapped_ratio logic · 8c086340
      Linus Torvalds authored
      
      
      This code harks back to the days when we didn't count dirty mapped
      pages, which led us to try to balance the number of dirty unmapped pages
      by how much unmapped memory there was in the system.
      
      That makes no sense any more, since now the dirty counts include the
      mapped pages.  Not to mention that the math doesn't work with HIGHMEM
      machines anyway, and causes the unmapped_ratio to potentially turn
      negative (which we do catch thanks to clamping it at a minimum value,
      but I mention that as an indication of how broken the code is).
      
      The code also was written at a time when the default dirty ratio was
      much larger, and the unmapped_ratio logic effectively capped that large
      dirty ratio a bit.  Again, we've since lowered the dirty ratio rather
      aggressively, further lessening the point of that code.
      
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8c086340
    • Linus Torvalds's avatar
      Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 · adea27f4
      Linus Torvalds authored
      * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
        [NETFILTER]: Fix NULL pointer dereference in nf_nat_move_storage()
        [SUNHME]: VLAN support for sunhme
        [CHELSIO]: Fix skb->dev setting.
        [NETFILTER]: fix compat_nf_sockopt typo
        [INET]: Fix potential kfree on vmalloc-ed area of request_sock_queue
        [VIA_VELOCITY]: Don't oops on MTU change.
        iwl4965: fix not correctly dealing with hotunplug
        rt2x00: Fix chipset revision validation
        iwl3945: place CCK rates in front of OFDM for supported rates
        mac80211: Fix queuing of scan containing a SSID
      adea27f4
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus · 40787d00
      Linus Torvalds authored
      * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
        [MIPS] N32 needs to use the compat version of sys_nfsservctl.
        [MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts.
        [MIPS] Sibyte: Fix name of clocksource.
        [MIPS] SNI: s/achknowledge/acknowledge/
        [MIPS] Makefile: Fix canonical system names
        [MIPS] vpe: handle halting TCs in an errata safe way.
        [MIPS] Sibyte: Stop timers before programming next even.
        [MIPS] Sibyte: Increase minimum oneshot timer interval to two ticks.
        [MIPS] Lasat: Fix overlap of interrupt number ranges.
        [MIPS] SNI PCIT CPLUS: workaround for b0rked irq wiring of onboard PCI bus 1
        [MIPS] Fix shadow register support.
        [MIPS] Change get_cycles to always return 0.
        [MIPS] Fix typo in R3000 TRACE_IRQFLAGS code
        [MIPS] Sibyte: Replace use of removed IO_SPACE_BASE with IOADDR.
        [MIPS] iounmap if in vr41xx_pciu_init() pci clock is over 33MHz
        [MIPS] BCM1480: Remove duplicate acknowledge of timer interrupt.
        [MIPS] Sibyte: pin timer interrupt to their cores.
        [MIPS] Qemu: Add early printk, your friend in a cold night.
        [MIPS] Convert reference to mem_map to pfn_to_page().
        [MIPS] Sibyte: resurrect old cache hack.
      40787d00
    • Evgeniy Polyakov's avatar
      [NETFILTER]: Fix NULL pointer dereference in nf_nat_move_storage() · 77996525
      Evgeniy Polyakov authored
      Reported by Chuck Ebbert as:
      
      	https://bugzilla.redhat.com/show_bug.cgi?id=259501#c14
      
      
      
      This routine is called each time hash should be replaced, nf_conn has
      extension list which contains pointers to connection tracking users
      (like nat, which is right now the only such user), so when replace takes
      place it should copy own extensions. Loop above checks for own
      extension, but tries to move higer-layer one, which can lead to above
      oops.
      
      Signed-off-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77996525
    • Chris Poon's avatar
      [SUNHME]: VLAN support for sunhme · a5a97263
      Chris Poon authored
      
      
      This patch enables VLAN support on sunhme by increasing BMAC_TXMAX/BMAC_RXMAX
      and allocating extra space via skb_put for the VLAN header.
       
      Signed-off-by: default avatarChris Poon <dev-null@telus.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a5a97263
    • Ralf Baechle's avatar
    • Ralf Baechle's avatar
      [MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts. · 30e748a5
      Ralf Baechle authored
      
      
      This matters to any sort of device that is wired to one of the CPU
      interrupt pins on an SMP system.  Typically the scenario is most easily
      triggered with the count/compare timer interrupt where the same interrupt
      number and thus irq_desc is used on each processor.
      
         CPU A			CPU B
      
         do_IRQ()
         generic_handle_irq()
         handle_level_irq()
         spin_lock(desc_lock)
         set IRQ_INPROGRESS
         spin_unlock(desc_lock)
      				do_IRQ()
      				generic_handle_irq()
      				handle_level_irq()
      				spin_lock(desc_lock)
      				IRQ_INPROGRESS set => bail out
         spin_lock(desc_lock)
         clear IRQ_INPROGRESS
         spin_unlock(desc_lock)
      
      In case of the cp0 compare interrupt this means the interrupt will be
      acked and not handled or re-armed on CPU b, so there won't be any timer
      interrupt until the count register wraps around.
      
      With kernels 2.6.20 ... 2.6.23 we usually were lucky that things were just
      working right on VSMP because the count registers are synchronized on
      bootup so it takes something that disables interrupts for a long time on
      one processor to trigger this one.
      
      For scenarios where an interrupt is multicasted or broadcasted over several
      CPUs the existing code was safe and the fix will break it.  There is no
      way to know in the interrupt controller code because it is abstracted from
      the platform code.  I think we do not have such a setup currently, so this
      should be ok.
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      30e748a5
    • Ralf Baechle's avatar
      [MIPS] Sibyte: Fix name of clocksource. · f99f2cc9
      Ralf Baechle authored
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      f99f2cc9