1. 12 10月, 2011 1 次提交
  2. 13 7月, 2011 2 次提交
  3. 11 7月, 2011 2 次提交
    • N
      x86, ioapic: Also print Dest field · 7fece832
      Naga Chumbalkar 提交于
      The code in setup_ioapic_irq() determines the Destination Field,
      so why not also include it in the debug printk output that gets
      displayed when the boot parameter "apic=debug" is used.
      
      Before the change, "dmesg" will show:
      
       IOAPIC[0]: Set routing entry (8-1 -> 0x31 -> IRQ 1 Mode:0 Active:0)
       IOAPIC[0]: Set routing entry (8-2 -> 0x30 -> IRQ 0 Mode:0 Active:0)
       IOAPIC[0]: Set routing entry (8-3 -> 0x33 -> IRQ 3 Mode:0 Active:0) ...
      
      After the change, you will see:
      
       IOAPIC[0]: Set routing entry (8-1 -> 0x31 -> IRQ 1 Mode:0 Active:0 Dest:0)
       IOAPIC[0]: Set routing entry (8-2 -> 0x30 -> IRQ 0 Mode:0 Active:0 Dest:0)
       IOAPIC[0]: Set routing entry (8-3 -> 0x33 -> IRQ 3 Mode:0 Active:0 Dest:0) ...
      Signed-off-by: NNaga Chumbalkar <nagananda.chumbalkar@hp.com>
      Link: http://lkml.kernel.org/r/20110708184603.2734.91071.sendpatchset@nchumbalkar.americas.cpqcorp.netSigned-off-by: NIngo Molnar <mingo@elte.hu>
      7fece832
    • N
      x86, ioapic: Format clean up for IOAPIC output · bd6a46e0
      Naga Chumbalkar 提交于
      When IOAPIC data is displayed in "dmesg" with the help of the
      boot parameter "apic=debug" certain values are not formatted
      correctly wrt their size.
      
      In the "dmesg" snippet below, note that the output for "max
      redirection entries", and "IO APIC version" which are each
      defined to be just 8-bits long are displayed as 2 bytes in
      length. Similarly, "Dst" under the "IRQ redirection table"
      should only be 8-bits long.
      
      IO APIC #0......
      ...
      ...
      .... register #01: 00170020
      .......     : max redirection entries: 0017
      .......     : PRQ implemented: 0
      .......     : IO APIC version: 0020
      ...
      ...
      .... IRQ redirection table:
       NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:
       00 000 1    0    0   0   0    0    0    00
       01 000 0    0    0   0   0    0    0    31
       02 000 0    0    0   0   0    0    0    30
       03 000 1    0    0   0   0    0    0    33
      ...
      ...
      
      Do some formatting clean up, so you will see output like below:
      
      IO APIC #0......
      ...
      ...
      .... register #01: 00170020
      .......     : max redirection entries: 17
      .......     : PRQ implemented: 0
      .......     : IO APIC version: 20
      ...
      ...
      .... IRQ redirection table:
       NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:
       00 00  1    0    0   0   0    0    0    00
       01 00  0    0    0   0   0    0    0    31
       02 00  0    0    0   0   0    0    0    30
       03 00  1    0    0   0   0    0    0    33
      ...
      ...
      Signed-off-by: NNaga Chumbalkar <nagananda.chumbalkar@hp.com>
      Link: http://lkml.kernel.org/r/20110708184557.2734.61830.sendpatchset@nchumbalkar.americas.cpqcorp.netSigned-off-by: NIngo Molnar <mingo@elte.hu>
      bd6a46e0
  4. 08 7月, 2011 1 次提交
    • N
      x86: print APIC data a little later during boot · ded1f6ab
      Naga Chumbalkar 提交于
      To view IOAPIC data you could boot with "apic=debug".
      
      When booting in such a way then the kernel will dump the
      IO-APIC's registers, for example:
      
      NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:
       00 000 1    0    0   0   0    0    0    00
       01 000 0    0    0   0   0    0    0    31
       02 000 0    0    0   0   0    0    0    30
       03 000 0    0    0   0   0    0    0    33
       04 000 0    0    0   0   0    0    0    34
       05 000 0    0    0   0   0    0    0    35
       06 000 0    0    0   0   0    0    0    36
       07 000 0    0    0   0   0    0    0    37
       08 000 0    0    0   0   0    0    0    38
       09 000 0    1    0   0   0    0    0    39
       0a 000 0    0    0   0   0    0    0    3A
       0b 000 0    0    0   0   0    0    0    3B
       0c 000 0    0    0   0   0    0    0    3C
       0d 000 0    0    0   0   0    0    0    3D
       0e 000 0    0    0   0   0    0    0    3E
       0f 000 0    0    0   0   0    0    0    3F
       10 000 1    0    0   0   0    0    0    00
       11 000 1    0    0   0   0    0    0    00
       12 000 1    0    0   0   0    0    0    00
       13 000 1    0    0   0   0    0    0    00
       14 000 1    0    0   0   0    0    0    00
       15 000 1    0    0   0   0    0    0    00
       16 000 1    0    0   0   0    0    0    00
       17 000 1    0    0   0   0    0    0    00
      
      Delaying the call to print_ICs() gives better results:
      
      NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:
       00 000 1    0    0   0   0    0    0    00
       01 000 0    0    0   0   0    0    0    31
       02 000 0    0    0   0   0    0    0    30
       03 000 1    0    0   0   0    0    0    33
       04 000 1    0    0   0   0    0    0    34
       05 000 1    0    0   0   0    0    0    35
       06 000 1    0    0   0   0    0    0    36
       07 000 1    0    0   0   0    0    0    37
       08 000 0    0    0   0   0    0    0    38
       09 000 0    1    0   0   0    0    0    39
       0a 000 1    0    0   0   0    0    0    3A
       0b 000 1    0    0   0   0    0    0    3B
       0c 000 0    0    0   0   0    0    0    3C
       0d 000 1    0    0   0   0    0    0    3D
       0e 000 1    0    0   0   0    0    0    3E
       0f 000 1    0    0   0   0    0    0    3F
       10 000 1    1    0   1   0    0    0    29
       11 000 1    0    0   0   0    0    0    00
       12 000 1    0    0   0   0    0    0    00
       13 000 1    0    0   0   0    0    0    00
       14 000 0    1    0   1   0    0    0    51
       15 000 1    0    0   0   0    0    0    00
       16 000 0    1    0   1   0    0    0    61
       17 000 0    1    0   1   0    0    0    59
      
      Notice that the entries beyond interrupt input signal 0x0f also
      get populated and arent just the hw-initialization default of
      all zeroes.
      Signed-off-by: NNaga Chumbalkar <nagananda.chumbalkar@hp.com>
      Link: http://lkml.kernel.org/r/20110708083555.2598.42216.sendpatchset@nchumbalkar.americas.hpqcorp.netSigned-off-by: NIngo Molnar <mingo@elte.hu>
      ded1f6ab
  5. 25 5月, 2011 1 次提交
  6. 20 5月, 2011 9 次提交
  7. 28 4月, 2011 1 次提交
    • S
      x86: devicetree: Configure IOAPIC pin only once · 20443598
      Sebastian Andrzej Siewior 提交于
      We use io_apic_setup_irq_pin() in order to configure pin's interrupt
      number polarity and type. This is done on every irq_create_of_mapping()
      which happens for instance during pci enable calls. Level typed
      interrupts are masked by default, edge are unmasked.
      
      On the first ->xlate() call the level interrupt is configured and
      masked. The driver calls request_irq() and the line is unmasked. Lets
      assume the interrupt line is shared with another device and we call
      pci_enable_device() for this device. The ->xlate() configures the pin
      again and it is masked. request_irq() does not unmask the line because
      it _is_ already unmasked according to its internal state. So the
      interrupt will never be unmasked again.
      
      This patch is based on an earlier work by Torben Hohn and solves the
      problem by configuring the pin only once. Since all devices must agree
      on the same type and polarity there is no point in configuring the pin
      more than once.
      
      [ tglx: Split out the ce4100 part into a separate patch ]
      
      Cc: Torben Hohn <torbenh@linutronix.de>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Link: http://lkml.kernel.org/r/%3C20110427143052.GA15211%40linutronix.de%3ESigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      20443598
  8. 24 3月, 2011 1 次提交
    • R
      x86: Use syscore_ops instead of sysdev classes and sysdevs · f3c6ea1b
      Rafael J. Wysocki 提交于
      Some subsystems in the x86 tree need to carry out suspend/resume and
      shutdown operations with one CPU on-line and interrupts disabled and
      they define sysdev classes and sysdevs or sysdev drivers for this
      purpose.  This leads to unnecessarily complicated code and excessive
      memory usage, so switch them to using struct syscore_ops objects for
      this purpose instead.
      
      Generally, there are three categories of subsystems that use
      sysdevs for implementing PM operations: (1) subsystems whose
      suspend/resume callbacks ignore their arguments entirely (the
      majority), (2) subsystems whose suspend/resume callbacks use their
      struct sys_device argument, but don't really need to do that,
      because they can be implemented differently in an arguably simpler
      way (io_apic.c), and (3) subsystems whose suspend/resume callbacks
      use their struct sys_device argument, but the value of that argument
      is always the same and could be ignored (microcode_core.c).  In all
      of these cases the subsystems in question may be readily converted to
      using struct syscore_ops objects for power management and shutdown.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      f3c6ea1b
  9. 18 3月, 2011 1 次提交
  10. 12 3月, 2011 5 次提交
  11. 24 2月, 2011 11 次提交
  12. 23 2月, 2011 1 次提交
    • H
      x86: Rework arch_disable_smp_support() for x86 · 7167d08e
      Henrik Kretzschmar 提交于
      Currently arch_disable_smp_support() on x86 disables only the
      support for the IOAPIC and is also compiled in if SMP-support is
      not.
      
      Therefore this function is renamed to disable_ioapic_support(),
      which meets its purpose and is only compiled in the kernel
      when IOAPIC support is also.
      
      A new arch_disable_smp_support() is created in smpboot.c,
      which calls disable_ioapic_support() and gets only compiled
      in the kernel when SMP support is also.
      Signed-off-by: NHenrik Kretzschmar <henne@nachtwindheim.de>
      LKML-Reference: <1298385487-4708-3-git-send-email-henne@nachtwindheim.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7167d08e
  13. 15 2月, 2011 1 次提交
    • P
      x86, ioapic: Don't warn about non-existing IOAPICs if we have none · 678301ec
      Paul Bolle 提交于
      mp_find_ioapic() prints errors like:
      
          ERROR: Unable to locate IOAPIC for GSI 13
      
      if it can't find the IOAPIC that manages that specific GSI. I
      see errors like that at every boot of a laptop that apparently
      doesn't have any IOAPICs.
      
      But if there are no IOAPICs it doesn't seem to be an error that
      none can be found. A solution that gets rid of this message is
      to directly return if nr_ioapics (still) is zero. (But keep
      returning -1 in that case, so nothing breaks from this change.)
      
      The call chain that generates this error is:
      
      pnpacpi_allocated_resource()
          case ACPI_RESOURCE_TYPE_IRQ:
              pnpacpi_parse_allocated_irqresource()
                  acpi_get_override_irq()
                       mp_find_ioapic()
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      678301ec
  14. 11 2月, 2011 1 次提交
  15. 05 1月, 2011 1 次提交
    • Y
      x86: Fix APIC ID sizing bug on larger systems, clean up MAX_APICS confusion · cb2ded37
      Yinghai Lu 提交于
      Found one x2apic pre-enabled system, x2apic_mode suddenly get
      corrupted after register some cpus, when compiled
      CONFIG_NR_CPUS=255 instead of 512.
      
      It turns out that generic_processor_info() ==> phyid_set(apicid,
      phys_cpu_present_map) causes the problem.
      
      phys_cpu_present_map is sized by MAX_APICS bits, and pre-enabled
      system some cpus have an apic id > 255.
      
      The variable after phys_cpu_present_map may get corrupted
      silently:
      
       ffffffff828e8420 B phys_cpu_present_map
       ffffffff828e8440 B apic_verbosity
       ffffffff828e8444 B local_apic_timer_c2_ok
       ffffffff828e8448 B disable_apic
       ffffffff828e844c B x2apic_mode
       ffffffff828e8450 B x2apic_disabled
       ffffffff828e8454 B num_processors
       ...
      
      Actually phys_cpu_present_map is referenced via apic id, instead
      index. We should use MAX_LOCAL_APIC instead MAX_APICS.
      
      For 64-bit it will be 32768 in all cases. BSS will increase by 4k bytes
      on 64-bit:
      
      	text		data		bss		dec		filename
      	21696943	4193748		12787712	38678403	vmlinux.before
      	21696943	4193748		12791808	38682499	vmlinux.after
      
      No change on 32bit.
      
      Finally we can remove MAX_APCIS that was rather confusing.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      LKML-Reference: <4D23BD9C.3070102@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cb2ded37
  16. 30 12月, 2010 1 次提交