1. 08 Sep, 2009 1 commit
    • Kjetil Oftedal's avatar
      sparc: Fix multiple RTC detections on SUN4D · 25712efa
      Kjetil Oftedal authored
      Sorry about the slow response. Had some memory issues with the
      testbox.
      
      On SUN4D machines there is one RTC-chip located on each systemboard,
      when
      booting all of these will be probed. Registering a second RTC with the
      kernel fails, and breaks the rtc:
      [ 0.212000] kobject (f02625f0): tried to init an initialized object,
      somethi
      [ 0.212000] [f0141418 : platform_device_register+0x4/0x18 ] [f01edbc4
      : cloc
      [    0.216000] ------------[ cut here ]------------
      [ 0.216000] WARNING: at fs/sysfs/dir.c:487 sysfs_add_one+0x84/0xa4()
      [ 0.216000] sysfs: cannot create duplicate filename
      '/devices/platform/rtc-m
      [    0.216000] Modules linked in:
      [ 0.216000] [f00c1988 : sysfs_add_one+0x84/0xa4 ] [f00c1f70 :
      create_dir+0x4
      [    0.216000] ---[ end trace 139ce121c98e96c9 ]---
      [ 0.220000] kobject_add_internal failed for rtc-m48t59.0 with -EEXIST,
      don't
      [ 0.220000] [f013d568 : device_add+0xc8/0x610 ] [f014134c :
      platform_device_
      [    0.220000] Registering RTC device failed
      
      Later on in the boot the following happens:
      [   23.116000] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
      
      The suggested fix searches the supplied RTC node for a address
      property
      which only one RTC per system appears to have and registers only this
      RTC
      with the kernel. (Tested on SS20/SUN4M and SS1000E/SUN4D).
      Signed-off-by: default avatarKjetil Oftedal <oftedal@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25712efa
  2. 04 Sep, 2009 1 commit
    • David S. Miller's avatar
      sparc64: Fix bootup with mcount in some configs. · bd4352ca
      David S. Miller authored
      Functions invoked early when booting up a cpu can't use
      tracing because mcount requires a valid 'current_thread_info()'
      and TLB mappings to be setup.
      
      The code path of sun4v_register_mondo_queues --> register_one_mondo
      is one such case.  sun4v_register_mondo_queues already has the
      necessary 'notrace' annotation, but register_one_mondo does not.
      
      Normally register_one_mondo is inlined so the bug doesn't trigger,
      but with some config/compiler combinations, it won't be so we
      must properly mark it notrace.
      
      While we're here, add 'notrace' annoations to prom_printf and
      prom_halt so that early error handling won't have the same problem.
      Reported-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
      Reported-by: default avatarLeif Sawyer <lsawyer@gci.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bd4352ca
  3. 03 Sep, 2009 1 commit
    • David S. Miller's avatar
      sparc64: Kill spurious NMI watchdog triggers by increasing limit to 30 seconds. · e6617c6e
      David S. Miller authored
      This is a compromise and a temporary workaround for bootup NMI
      watchdog triggers some people see with qla2xxx devices present.
      
      This happens when, for example:
      
      CPU 0 is in the driver init and looping submitting mailbox commands to
      load the firmware, then waiting for completion.
      
      CPU 1 is receiving the device interrupts.  CPU 1 is where the NMI
      watchdog triggers.
      
      CPU 0 is submitting mailbox commands fast enough that by the time CPU
      1 returns from the device interrupt handler, a new one is pending.
      This sequence runs for more than 5 seconds.
      
      The problematic case is CPU 1's timer interrupt running when the
      barrage of device interrupts begin.  Then we have:
      
      	timer interrupt
      	return for softirq checking
      	pending, thus enable interrupts
      
      		 qla2xxx interrupt
      		 return
      		 qla2xxx interrupt
      		 return
      		 ... 5+ seconds pass
      		 final qla2xxx interrupt for fw load
      		 return
      
      	run timer softirq
      	return
      
      At some point in the multi-second qla2xxx interrupt storm we trigger
      the NMI watchdog on CPU 1 from the NMI interrupt handler.
      
      The timer softirq, once we get back to running it, is smart enough to
      run the timer work enough times to make up for the missed timer
      interrupts.
      
      However, the NMI watchdogs (both x86 and sparc) use the timer
      interrupt count to notice the cpu is wedged.  But in the above
      scenerio we'll receive only one such timer interrupt even if we last
      all the way back to running the timer softirq.
      
      The default watchdog trigger point is only 5 seconds, which is pretty
      low (the softwatchdog triggers at 60 seconds).  So increase it to 30
      seconds for now.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6617c6e
  4. 25 Aug, 2009 1 commit
    • David S. Miller's avatar
      sparc64: Validate linear D-TLB misses. · d8ed1d43
      David S. Miller authored
      When page alloc debugging is not enabled, we essentially accept any
      virtual address for linear kernel TLB misses.  But with kgdb, kernel
      address probing, and other facilities we can try to access arbitrary
      crap.
      
      So, make sure the address we miss on will translate to physical memory
      that actually exists.
      
      In order to make this work we have to embed the valid address bitmap
      into the kernel image.  And in order to make that less expensive we
      make an adjustment, in that the max physical memory address is
      decreased to "1 << 41", even on the chips that support a 42-bit
      physical address space.  We can do this because bit 41 indicates
      "I/O space" and thus covers non-memory ranges.
      
      The result of this is that:
      
      1) kpte_linear_bitmap shrinks from 2K to 1K in size
      
      2) we need 64K more for the valid address bitmap
      
      We can't let the valid address bitmap be dynamically allocated
      once we start using it to validate TLB misses, otherwise we have
      crazy issues to deal with wrt. recursive TLB misses and such.
      
      If we're in a TLB miss it could be the deepest trap level that's legal
      inside of the cpu.  So if we TLB miss referencing the bitmap, the cpu
      will be out of trap levels and enter RED state.
      
      To guard against out-of-range accesses to the bitmap, we have to check
      to make sure no bits in the physical address above bit 40 are set.  We
      could export and use last_valid_pfn for this check, but that's just an
      unnecessary extra memory reference.
      
      On the plus side of all this, since we load all of these translations
      into the special 4MB mapping TSB, and we check the TSB first for TLB
      misses, there should be absolutely no real cost for these new checks
      in the TLB miss path.
      
      Reported-by: heyongli@gmail.com
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d8ed1d43
  5. 19 Aug, 2009 4 commits
  6. 03 Aug, 2009 1 commit
  7. 28 Jul, 2009 1 commit
  8. 17 Jul, 2009 1 commit
  9. 26 Jun, 2009 6 commits
  10. 24 Jun, 2009 23 commits