]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile...
authorIngo Molnar <mingo@elte.hu>
Wed, 8 Jun 2011 13:49:03 +0000 (15:49 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 8 Jun 2011 13:49:03 +0000 (15:49 +0200)
arch/x86/kernel/apic/apic.c
arch/x86/oprofile/op_model_amd.c

index b961af86bfea214d273a392b69cf0e359e2a3a83..b9338b8cf420ca94e37c7da64dc1fa1910f19f91 100644 (file)
@@ -390,7 +390,8 @@ static unsigned int reserve_eilvt_offset(int offset, unsigned int new)
 
 /*
  * If mask=1, the LVT entry does not generate interrupts while mask=0
- * enables the vector. See also the BKDGs.
+ * enables the vector. See also the BKDGs. Must be called with
+ * preemption disabled.
  */
 
 int setup_APIC_eilvt(u8 offset, u8 vector, u8 msg_type, u8 mask)
index 9fd8a567fe1e41a739dff21d02f9c2cd8a3a98d2..9cbb710dc94b6ee8c6df0fec2004173ac667d882 100644 (file)
@@ -609,16 +609,21 @@ static int setup_ibs_ctl(int ibs_eilvt_off)
        return 0;
 }
 
+/*
+ * This runs only on the current cpu. We try to find an LVT offset and
+ * setup the local APIC. For this we must disable preemption. On
+ * success we initialize all nodes with this offset. This updates then
+ * the offset in the IBS_CTL per-node msr. The per-core APIC setup of
+ * the IBS interrupt vector is called from op_amd_setup_ctrs()/op_-
+ * amd_cpu_shutdown() using the new offset.
+ */
 static int force_ibs_eilvt_setup(void)
 {
        int offset;
        int ret;
 
-       /*
-        * find the next free available EILVT entry, skip offset 0,
-        * pin search to this cpu
-        */
        preempt_disable();
+       /* find the next free available EILVT entry, skip offset 0 */
        for (offset = 1; offset < APIC_EILVT_NR_MAX; offset++) {
                if (get_eilvt(offset))
                        break;