Skip to content

Commit 5b3306f

Browse files
rnavmpe
authored andcommitted
powerpc/pseries: Do not save the previous DTL mask value
When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is enabled, we always initialize DTL enable mask to DTL_LOG_PREEMPT (0x2). There are no other places where the mask is changed. As such, when reading the DTL log buffer through debugfs, there is no need to save and restore the previous mask value. We don't need to save and restore the earlier mask value if CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not enabled. So, remove the field from the structure as well. Acked-by: Nathan Lynch <nathanl@linux.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 515bbc8 commit 5b3306f

File tree

1 file changed

+1
-3
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+1
-3
lines changed

arch/powerpc/platforms/pseries/dtl.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ struct dtl_ring {
5555
struct dtl_entry *write_ptr;
5656
struct dtl_entry *buf;
5757
struct dtl_entry *buf_end;
58-
u8 saved_dtl_mask;
5958
};
6059

6160
static DEFINE_PER_CPU(struct dtl_ring, dtl_rings);
@@ -105,7 +104,6 @@ static int dtl_start(struct dtl *dtl)
105104
dtlr->write_ptr = dtl->buf;
106105

107106
/* enable event logging */
108-
dtlr->saved_dtl_mask = lppaca_of(dtl->cpu).dtl_enable_mask;
109107
lppaca_of(dtl->cpu).dtl_enable_mask |= dtl_event_mask;
110108

111109
dtl_consumer = consume_dtle;
@@ -123,7 +121,7 @@ static void dtl_stop(struct dtl *dtl)
123121
dtlr->buf = NULL;
124122

125123
/* restore dtl_enable_mask */
126-
lppaca_of(dtl->cpu).dtl_enable_mask = dtlr->saved_dtl_mask;
124+
lppaca_of(dtl->cpu).dtl_enable_mask = DTL_LOG_PREEMPT;
127125

128126
if (atomic_dec_and_test(&dtl_count))
129127
dtl_consumer = NULL;

0 commit comments

Comments
 (0)