Skip to content

Commit

Permalink
Automatic merge of 'fixes-test' into merge-test (2024-04-29 23:57)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpe committed Apr 29, 2024
2 parents 71646ac + 49a940d commit 59b4e17
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
5 changes: 2 additions & 3 deletions arch/powerpc/include/asm/plpks.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@
#define PLPKS_MAX_DATA_SIZE 4000

// Timeouts for PLPKS operations
#define PLPKS_MAX_TIMEOUT 5000 // msec
#define PLPKS_FLUSH_SLEEP 10 // msec
#define PLPKS_FLUSH_SLEEP_RANGE 400
#define PLPKS_MAX_TIMEOUT (5 * USEC_PER_SEC)
#define PLPKS_FLUSH_SLEEP 10000 // usec

struct plpks_var {
char *component;
Expand Down
8 changes: 8 additions & 0 deletions arch/powerpc/platforms/pseries/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,16 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
* parent bus. During reboot, there will be ibm,dma-window property to
* define DMA window. For kdump, there will at least be default window or DDW
* or both.
* There is an exception to the above. In case the PE goes into frozen
* state, firmware may not provide ibm,dma-window property at the time
* of LPAR boot up.
*/

if (!pdn) {
pr_debug(" no ibm,dma-window property !\n");
return;
}

ppci = PCI_DN(pdn);

pr_debug(" parent is %pOF, iommu_table: 0x%p\n",
Expand Down
10 changes: 5 additions & 5 deletions arch/powerpc/platforms/pseries/plpks.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,7 @@ static int plpks_confirm_object_flushed(struct label *label,
break;
}

usleep_range(PLPKS_FLUSH_SLEEP,
PLPKS_FLUSH_SLEEP + PLPKS_FLUSH_SLEEP_RANGE);
fsleep(PLPKS_FLUSH_SLEEP);
timeout = timeout + PLPKS_FLUSH_SLEEP;
} while (timeout < PLPKS_MAX_TIMEOUT);

Expand Down Expand Up @@ -464,9 +463,10 @@ int plpks_signed_update_var(struct plpks_var *var, u64 flags)

continuetoken = retbuf[0];
if (pseries_status_to_err(rc) == -EBUSY) {
int delay_ms = get_longbusy_msecs(rc);
mdelay(delay_ms);
timeout += delay_ms;
int delay_us = get_longbusy_msecs(rc) * 1000;

fsleep(delay_us);
timeout += delay_us;
}
rc = pseries_status_to_err(rc);
} while (rc == -EBUSY && timeout < PLPKS_MAX_TIMEOUT);
Expand Down

0 comments on commit 59b4e17

Please sign in to comment.