1. 01 12月, 2008 2 次提交
    • D
      powerpc: Fix boot freeze on machine with empty memory node · 4a618669
      Dave Hansen 提交于
      I got a bug report about a distro kernel not booting on a particular
      machine.  It would freeze during boot:
      
      > ...
      > Could not find start_pfn for node 1
      > [boot]0015 Setup Done
      > Built 2 zonelists in Node order, mobility grouping on.  Total pages: 123783
      > Policy zone: DMA
      > Kernel command line:
      > [boot]0020 XICS Init
      > [boot]0021 XICS Done
      > PID hash table entries: 4096 (order: 12, 32768 bytes)
      > clocksource: timebase mult[7d0000] shift[22] registered
      > Console: colour dummy device 80x25
      > console handover: boot [udbg0] -> real [hvc0]
      > Dentry cache hash table entries: 1048576 (order: 7, 8388608 bytes)
      > Inode-cache hash table entries: 524288 (order: 6, 4194304 bytes)
      > freeing bootmem node 0
      
      I've reproduced this on 2.6.27.7.  It is caused by commit
      8f64e1f2 ("powerpc: Reserve in bootmem
      lmb reserved regions that cross NUMA nodes").
      
      The problem is that Jon took a loop which was (in pseudocode):
      
      	for_each_node(nid)
      		NODE_DATA(nid) = careful_alloc(nid);
      		setup_bootmem(nid);
      		reserve_node_bootmem(nid);
      
      and broke it up into:
      
      	for_each_node(nid)
      		NODE_DATA(nid) = careful_alloc(nid);
      		setup_bootmem(nid);
      	for_each_node(nid)
      		reserve_node_bootmem(nid);
      
      The issue comes in when the 'careful_alloc()' is called on a node with
      no memory.  It falls back to using bootmem from a previously-initialized
      node.  But, bootmem has not yet been reserved when Jon's patch is
      applied.  It gives back bogus memory (0xc000000000000000) and pukes
      later in boot.
      
      The following patch collapses the loop back together.  It also breaks
      the mark_reserved_regions_for_nid() code out into a function and adds
      some comments.  I think a huge part of introducing this bug is because
      for loop was too long and hard to read.
      
      The actual bug fix here is the:
      
      +		if (end_pfn <= node->node_start_pfn ||
      +		    start_pfn >= node_end_pfn)
      +			continue;
      Signed-off-by: NDave Hansen <dave@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4a618669
    • A
      powerpc: Fix IRQ assignment for some PCIe devices · 4b824de9
      Adhemerval Zanella 提交于
      Currently, some PCIe devices on POWER6 machines do not get interrupts
      assigned correctly.  The problem is that OF doesn't create an
      "interrupt" property for them.  The fix is for of_irq_map_pci to fall
      back to using the value in the PCI interrupt-pin register in config
      space, as we do when there is no OF device-tree node for the device.
      
      I have verified that this works fine with a pair of Squib-E SAS
      adapter on a P6-570.
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4b824de9
  2. 24 11月, 2008 3 次提交
  3. 21 11月, 2008 1 次提交
    • J
      powerpc/spufs: Fix spinning in spufs_ps_fault on signal · 60657263
      Jeremy Kerr 提交于
      Currently, we can end up in an infinite loop if we get a signal
      while the kernel has faulted in spufs_ps_fault. Eg:
      
       alarm(1);
      
       write(fd, some_spu_psmap_register_address, 4);
      
      - the write's copy_from_user will fault on the ps mapping, and
      signal_pending will be non-zero. Because returning from the fault
      handler will never clear TIF_SIGPENDING, so we'll just keep faulting,
      resulting in an unkillable process using 100% of CPU.
      
      This change returns VM_FAULT_SIGBUS if there's a fatal signal pending,
      letting us escape the loop.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      60657263
  4. 20 11月, 2008 3 次提交
  5. 19 11月, 2008 7 次提交
  6. 18 11月, 2008 21 次提交
  7. 17 11月, 2008 3 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 · 9753b127
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
        rtc: rtc-sun4v fixes, revised
        sparc: Fix tty compile warnings.
        sparc: struct device - replace bus_id with dev_name(), dev_set_name()
      9753b127
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 847e9170
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits)
        rtnetlink: propagate error from dev_change_flags in do_setlink()
        isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_reply
        Phonet: refuse to send bigger than MTU packets
        e1000e: fix IPMI traffic
        e1000e: fix warn_on reload after phy_id error
        phy: fix phy address bug
        e100: fix dma error in direction for mapping
        igb: use dev_printk instead of printk
        qla3xxx: Cleanup: Fix link print statements.
        igb: Use device_set_wakeup_enable
        e1000: Use device_set_wakeup_enable
        e1000e: Use device_set_wakeup_enable
        via-velocity: enable perfect filtering for multicast packets
        phy: Add support for Marvell 88E1118 PHY
        mlx4_en: Pause parameters per port
        phylib: fix premature freeing of struct mii_bus
        atl1: Do not enumerate options unsupported by chip
        atl1e: fix broken multicast by removing unnecessary crc inversion
        gianfar: Fix DMA unmap invocations
        net/ucc_geth: Fix oops in uec_get_ethtool_stats()
        ...
      847e9170
    • O
      sched, signals: fix the racy usage of ->signal in account_group_xxx/run_posix_cpu_timers · ad133ba3
      Oleg Nesterov 提交于
      Impact: fix potential NULL dereference
      
      Contrary to ad474cac changelog, other
      acct_group_xxx() helpers can be called after exit_notify() by timer tick.
      Thanks to Roland for pointing out this. Somehow I missed this simple fact
      when I read the original patch, and I am afraid I confused Frank during
      the discussion. Sorry.
      
      Fortunately, these helpers work with current, we can check ->exit_state
      to ensure that ->signal can't go away under us.
      
      Also, add the comment and compiler barrier to account_group_exec_runtime(),
      to make sure we load ->signal only once.
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ad133ba3