1. 19 10月, 2006 2 次提交
    • M
      PCI: optionally sort device lists breadth-first · 6b4b78fe
      Matt Domsch 提交于
      Problem:
      New Dell PowerEdge servers have 2 embedded ethernet ports, which are
      labeled NIC1 and NIC2 on the chassis, in the BIOS setup screens, and
      in the printed documentation.  Assuming no other add-in ethernet ports
      in the system, Linux 2.4 kernels name these eth0 and eth1
      respectively.  Many people have come to expect this naming.  Linux 2.6
      kernels name these eth1 and eth0 respectively (backwards from
      expectations).  I also have reports that various Sun and HP servers
      have similar behavior.
      
      
      Root cause:
      Linux 2.4 kernels walk the pci_devices list, which happens to be
      sorted in breadth-first order (or pcbios_find_device order on i386,
      which most often is breadth-first also).  2.6 kernels have both the
      pci_devices list and the pci_bus_type.klist_devices list, the latter
      is what is walked at driver load time to match the pci_id tables; this
      klist happens to be in depth-first order.
      
      On systems where, for physical routing reasons, NIC1 appears on a
      lower bus number than NIC2, but NIC2's bridge is discovered first in
      the depth-first ordering, NIC2 will be discovered before NIC1.  If the
      list were sorted breadth-first, NIC1 would be discovered before NIC2.
      
      A PowerEdge 1955 system has the following topology which easily
      exhibits the difference between depth-first and breadth-first device
      lists.
      
      -[0000:00]-+-00.0  Intel Corporation 5000P Chipset Memory Controller Hub
                 +-02.0-[0000:03-08]--+-00.0-[0000:04-07]--+-00.0-[0000:05-06]----00.0-[0000:06]----00.0  Broadcom Corporation NetXtreme II BCM5708S Gigabit Ethernet (labeled NIC2, 2.4 kernel name eth1, 2.6 kernel name eth0)
                 +-1c.0-[0000:01-02]----00.0-[0000:02]----00.0  Broadcom Corporation NetXtreme II BCM5708S Gigabit Ethernet (labeled NIC1, 2.4 kernel name eth0, 2.6 kernel name eth1)
      
      
      Other factors, such as device driver load order and the presence of
      PCI slots at various points in the bus hierarchy further complicate
      this problem; I'm not trying to solve those here, just restore the
      device order, and thus basic behavior, that 2.4 kernels had.
      
      
      Solution:
      
      The solution can come in multiple steps.
      
      Suggested fix #1: kernel
      Patch below optionally sorts the two device lists into breadth-first
      ordering to maintain compatibility with 2.4 kernels.  It adds two new
      command line options:
        pci=bfsort
        pci=nobfsort
      to force the sort order, or not, as you wish.  It also adds DMI checks
      for the specific Dell systems which exhibit "backwards" ordering, to
      make them "right".
      
      
      Suggested fix #2: udev rules from userland
      Many people also have the expectation that embedded NICs are always
      discovered before add-in NICs (which this patch does not try to do).
      Using the PCI IRQ Routing Table provided by system BIOS, it's easy to
      determine which PCI devices are embedded, or if add-in, which PCI slot
      they're in.  I'm working on a tool that would allow udev to name
      ethernet devices in ascending embedded, slot 1 .. slot N order,
      subsort by PCI bus/dev/fn breadth-first.  It'll be possible to use it
      independent of udev as well for those distributions that don't use
      udev in their installers.
      
      Suggested fix #3: system board routing rules
      One can constrain the system board layout to put NIC1 ahead of NIC2
      regardless of breadth-first or depth-first discovery order.  This adds
      a significant level of complexity to board routing, and may not be
      possible in all instances (witness the above systems from several
      major manufacturers).  I don't want to encourage this particular train
      of thought too far, at the expense of not doing #1 or #2 above.
      
      
      Feedback appreciated.  Patch tested on a Dell PowerEdge 1955 blade
      with 2.6.18.
      
      You'll also note I took some liberty and temporarily break the klist
      abstraction to simplify and speed up the sort algorithm.  I think
      that's both safe and appropriate in this instance.
      Signed-off-by: NMatt Domsch <Matt_Domsch@dell.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      6b4b78fe
    • E
      PCI: Turn pci_fixup_video into generic for embedded VGA · b5e4efe7
      eiichiro.oiwa.nm@hitachi.com 提交于
      pci_fixup_video turns into generic code because there are many platforms need this fixup
      for embedded VGA as well as x86. The Video BIOS integrates into System BIOS on a machine
      has embedded VGA although embedded VGA generally don't have PCI ROM. As a result,
      embedded VGA need the way that the sysfs rom points to the Video BIOS of System
      RAM (0xC0000). PCI-to-PCI Bridge Architecture specification describes the condition whether
      or not PCI ROM forwards VGA compatible memory address. fixup_video suits this specification.
      Although the Video ROM generally implements in x86 code regardless of platform, some
      application such as X Window System can run this code by dosemu86. Therefore,
      pci_fixup_video should turn into generic code.
      Signed-off-by: NEiichiro Oiwa <eiichiro.oiwa.nm@hitachi.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Acked-by: NJesse Barnes <jesse.barnes@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b5e4efe7
  2. 18 10月, 2006 6 次提交
  3. 17 10月, 2006 4 次提交
    • P
      [PATCH] lockdep: annotate i386 apm · 3864c489
      Peter Zijlstra 提交于
      Lockdep doesn't like to enable interrupts when they are enabled already.
      
      BUG: warning at kernel/lockdep.c:1814/trace_hardirqs_on() (Not tainted)
       [<c04051ed>] show_trace_log_lvl+0x58/0x16a
       [<c04057fa>] show_trace+0xd/0x10
       [<c0405913>] dump_stack+0x19/0x1b
       [<c043abfb>] trace_hardirqs_on+0xa2/0x11e
       [<c041463c>] apm_bios_call_simple+0xcd/0xfd
       [<c0415242>] apm+0x92/0x5b1
       [<c0402005>] kernel_thread_helper+0x5/0xb
      DWARF2 unwinder stuck at kernel_thread_helper+0x5/0xb
      Leftover inexact backtrace:
       [<c04057fa>] show_trace+0xd/0x10
       [<c0405913>] dump_stack+0x19/0x1b
       [<c043abfb>] trace_hardirqs_on+0xa2/0x11e
       [<c041463c>] apm_bios_call_simple+0xcd/0xfd
       [<c0415242>] apm+0x92/0x5b1
       [<c0402005>] kernel_thread_helper+0x5/0xb
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3864c489
    • I
      [PATCH] genirq: clean up irq-flow-type naming · a460e745
      Ingo Molnar 提交于
      Introduce desc->name and eliminate the handle_irq_name() hack.  Add
      set_irq_chip_and_handler_name() to set the flow type and name at once.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Matthew Wilcox <willy@debian.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a460e745
    • J
      [PATCH] i386 Time: Avoid PIT SMP lockups · 3f4a0b91
      john stultz 提交于
      Avoid possible PIT livelock issues seen on SMP systems (and reported by
      Andi), by not allowing it as a clocksource on SMP boxes.
      
      However, since the PIT may no longer be present, we have to properly handle
      the cases where SMP systems have TSC skew and fall back from the TSC.
      Since the PIT isn't there, it would "fall back" to the TSC again.  So this
      changes the jiffies rating to 1, and the TSC-bad rating value to 0.
      
      Thus you will get the following behavior priority on i386 systems:
      
      tsc		[if present & stable]
      hpet		[if present]
      cyclone		[if present]
      acpi_pm		[if present]
      pit		[if UP]
      jiffies
      
      Rather then the current more complicated:
      tsc		[if present & stable]
      hpet		[if present]
      cyclone		[if present]
      acpi_pm		[if present]
      pit		[if cpus < 4]
      tsc		[if present & unstable]
      jiffies
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3f4a0b91
    • R
      [ARM] Update mach-types · 0f6f65f6
      Russell King 提交于
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      0f6f65f6
  4. 16 10月, 2006 13 次提交
  5. 15 10月, 2006 1 次提交
  6. 14 10月, 2006 3 次提交
  7. 13 10月, 2006 6 次提交
  8. 12 10月, 2006 5 次提交
    • E
      [PATCH] x86_64 irq: Properly update vector_irq · 994bd4f9
      Eric W. Biederman 提交于
      This patch fixes my one line thinko where I was clearing
      the vector_irq entries on the wrong cpus.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      994bd4f9
    • M
      [SPARC32]: Fix sparc32 modpost warnings. · ab5da288
      Martin Habets 提交于
      Fix these 2.6.19-rc1 build warnings from modpost:
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'core_kernel_text' (at offset 0x3e060) and '__kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'core_kernel_text' (at offset 0x3e064) and '__kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'core_kernel_text' (at offset 0x3e07c) and '__kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'core_kernel_text' (at offset 0x3e080) and '__kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'is_ksym_addr' (at offset 0x4b3a4) and 'kallsyms_expand_symbol'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'is_ksym_addr' (at offset 0x4b3a8) and 'kallsyms_expand_symbol'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'is_ksym_addr' (at offset 0x4b3b4) and 'kallsyms_expand_symbol'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'is_ksym_addr' (at offset 0x4b3e4) and 'kallsyms_expand_symbol'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0x4b640) and 'kallsyms_lookup_size_offset'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0x4b644) and 'kallsyms_lookup_size_offset'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'get_symbol_pos' (at offset 0x4b654) and 'kallsyms_lookup_size_offset'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'get_symbol_pos' (at offset 0x4b658) and 'kallsyms_lookup_size_offset'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0x4b68c) and 'kallsyms_lookup_size_offset'
      
      The crux of the matter is that modpost only checks the relocatable
      sections. i386 vmlinux has none, so modpost does no checking on it (it
      does on the modules).  However, sparc vmlinux has plenty of
      relocatable sections because it is being built with 'ld -r' (to allow
      for btfixup processing).  So for sparc, modpost does do a lot of
      checking. Sure enough, running modpost on arch/sparc/boot/image yields
      no output (i.e. all is well).
      
      modpost.c check_sec_ref() has:
                      /* We want to process only relocation sections and not .init */
                      if (sechdrs[i].sh_type == SHT_RELA) {
      			// check here
                      } else if (sechdrs[i].sh_type == SHT_REL) {
      			// check here
      		}
      Signed-off-by: NMartin Habets <errandir_news@mph.eclipse.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab5da288
    • M
      [SPARC32]: Fix sparc32 modpost warnings with sunzilog · eba8cefc
      Martin Habets 提交于
      Fix this 2.6.19-rc1 build warnings from modpost:
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:sunzilog_console_setup from .data between 'sunzilog_console' (at offset 0x8394) and 'devices_subsys'
      Signed-off-by: NMartin Habets <errandir_news@mph.eclipse.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eba8cefc
    • M
      [SPARC32]: Mark srmmu_nocache_init as __init. · e3096de3
      Martin Habets 提交于
      Fix these 2.6.19-rc1 build warnings from modpost:
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:__alloc_bootmem from .text between 'srmmu_nocache_init' (at offset 0x1a0f8) and 'srmmu_mmu_info'
      WARNING: vmlinux - Section mismatch: reference to .init.text:__alloc_bootmem from .text between 'srmmu_nocache_init' (at offset 0x1a118) and 'srmmu_mmu_info'
      WARNING: vmlinux - Section mismatch: reference to .init.text:srmmu_early_allocate_ptable_skeleton from .text between 'srmmu_nocache_init' (at offset 0x1a188) and 'srmmu_mmu_info'
      Signed-off-by: NMartin Habets <errandir_news@mph.eclipse.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3096de3
    • D
      [SPARC32]: pcic.c needs asm/irq_regs.h · c2baeb05
      David S. Miller 提交于
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c2baeb05