Skip to content
  1. Nov 18, 2007
    • 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
  2. Nov 17, 2007
  3. 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
    • Maciej W. Rozycki's avatar
    • Maciej W. Rozycki's avatar
      [MIPS] Makefile: Fix canonical system names · 3247989e
      Maciej W. Rozycki authored
      
      
      The GNU `config.guess' uses "linux-gnu" as the canonical system name.
      Fix the list of compiler prefixes checked to spell it correctly.
      
      Signed-off-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      3247989e
    • Nigel Stephens's avatar
      [MIPS] vpe: handle halting TCs in an errata safe way. · 7c3a622d
      Nigel Stephens authored
      
      
      Adds a JR.HB after halting a TC, to ensure that the TC has really halted.
      only modifies the TCSTATUS register when the TC is safely halted.
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      7c3a622d
    • Ralf Baechle's avatar
      [MIPS] Sibyte: Stop timers before programming next even. · 8dfa741f
      Ralf Baechle authored
      
      
      We have no guarantee by the generic time code that the timer is stopped
      when the ->next_event method is called.  Modifying the Timer Initial Count
      register while the timer is enabled has UNPREDICTABLE effect according to
      the BCM1250/BCM1125/BCM1125H User Manual.  So stop the timer before
      reprogramming.
      
      This is a paranoia fix; no ill effects have been observed previously.
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      8dfa741f
    • Ralf Baechle's avatar
      [MIPS] Sibyte: Increase minimum oneshot timer interval to two ticks. · 62247753
      Ralf Baechle authored
      
      
      For the old minimum of a single tick a value of zero would be programmed
      into the init value register which in the BCM1250/BCM1125/BCM1125H User
      Manual in the Timer Special Cases section is documented to have
      UNPREDICTABLE effect.
      
      Observable sympthoms of this bug were hangs of several seconds on the
      console during bootup and later if both dyntick and highres timer options
      were activated.
      
      In theory contiguous mode of the timers is also affected but in an act of
      hopeless lack of realism I'll assume nobody will ever configure a KERNEL
      for HZ > 500kHz but if so I leave that to evolution to sort out.
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      62247753
    • Yoichi Yuasa's avatar
      [MIPS] Lasat: Fix overlap of interrupt number ranges. · 89becf5c
      Yoichi Yuasa authored
      
      
      The range of MIPS_CPU IRQ and the range of LASAT IRQ overlap.
      
      Signed-off-by: default avatarYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      89becf5c
    • Thomas Bogendoerfer's avatar
    • Ralf Baechle's avatar
      [MIPS] Fix shadow register support. · f6771dbb
      Ralf Baechle authored
      
      
      Shadow register support would not possibly have worked on multicore
      systems.  The support code for it was also depending not on MIPS R2 but
      VSMP or SMTC kernels even though it makes perfect sense with UP kernels.
      
      SR sets are a scarce resource and the expected usage pattern is that
      users actually hardcode the register set numbers in their code.  So fix
      the allocator by ditching it.  Move the remaining CPU probe bits into
      the generic CPU probe.
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      f6771dbb
    • Ralf Baechle's avatar
      [MIPS] Change get_cycles to always return 0. · efb9ca08
      Ralf Baechle authored
      
      
      This avoids us executing an mfc0 c0_count instruction on processors which
      don't have but also on certain R4000 and R4400 versions where reading from
      the count register just in the very moment when its value equals
      c0_compare will result in the timer interrupt getting lost.
      
      There is still a number of users of get_cycles remaining outside the
      arch code:
      
      crypto/tcrypt.c:                start = get_cycles();
      crypto/tcrypt.c:                end = get_cycles();
      crypto/tcrypt.c:                start = get_cycles();
      crypto/tcrypt.c:                end = get_cycles();
      crypto/tcrypt.c:                start = get_cycles();
      crypto/tcrypt.c:                end = get_cycles();
      drivers/char/hangcheck-timer.c: return get_cycles();
      drivers/char/hangcheck-timer.c: printk("Hangcheck: Using get_cycles().\n");
      drivers/char/random.c:  sample.cycles = get_cycles();
      drivers/input/joystick/analog.c:#define GET_TIME(x)     do { x = get_cycles(); }
      include/linux/arcdevice.h:          _x = get_cycles(); \
      include/linux/arcdevice.h:          _y = get_cycles(); \
      mm/slub.c:      if (!s->defrag_ratio || get_cycles() % 1024 > s->defrag_ratio)
      mm/slub.c:      p += 64 + (get_cycles() & 0xff) * sizeof(void *);
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      efb9ca08