Merge tag 'powerpc-6.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: - Fix incorrect delay handling in the plpks (keystore) code - Fix a panic when an LPAR boots with a frozen PE Thanks to Andrew Donnellan, Gaurav Batra, Nageswara R Sastry, and Nayna Jain. * tag 'powerpc-6.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries/iommu: LPAR panics during boot up with a frozen PE powerpc/pseries: make max polling consistent for longer H_CALLs
This commit is contained in:
@@ -44,9 +44,8 @@
|
|||||||
#define PLPKS_MAX_DATA_SIZE 4000
|
#define PLPKS_MAX_DATA_SIZE 4000
|
||||||
|
|
||||||
// Timeouts for PLPKS operations
|
// Timeouts for PLPKS operations
|
||||||
#define PLPKS_MAX_TIMEOUT 5000 // msec
|
#define PLPKS_MAX_TIMEOUT (5 * USEC_PER_SEC)
|
||||||
#define PLPKS_FLUSH_SLEEP 10 // msec
|
#define PLPKS_FLUSH_SLEEP 10000 // usec
|
||||||
#define PLPKS_FLUSH_SLEEP_RANGE 400
|
|
||||||
|
|
||||||
struct plpks_var {
|
struct plpks_var {
|
||||||
char *component;
|
char *component;
|
||||||
|
|||||||
@@ -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
|
* 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
|
* define DMA window. For kdump, there will at least be default window or DDW
|
||||||
* or both.
|
* 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);
|
ppci = PCI_DN(pdn);
|
||||||
|
|
||||||
pr_debug(" parent is %pOF, iommu_table: 0x%p\n",
|
pr_debug(" parent is %pOF, iommu_table: 0x%p\n",
|
||||||
|
|||||||
@@ -415,8 +415,7 @@ static int plpks_confirm_object_flushed(struct label *label,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
usleep_range(PLPKS_FLUSH_SLEEP,
|
fsleep(PLPKS_FLUSH_SLEEP);
|
||||||
PLPKS_FLUSH_SLEEP + PLPKS_FLUSH_SLEEP_RANGE);
|
|
||||||
timeout = timeout + PLPKS_FLUSH_SLEEP;
|
timeout = timeout + PLPKS_FLUSH_SLEEP;
|
||||||
} while (timeout < PLPKS_MAX_TIMEOUT);
|
} while (timeout < PLPKS_MAX_TIMEOUT);
|
||||||
|
|
||||||
@@ -464,9 +463,10 @@ int plpks_signed_update_var(struct plpks_var *var, u64 flags)
|
|||||||
|
|
||||||
continuetoken = retbuf[0];
|
continuetoken = retbuf[0];
|
||||||
if (pseries_status_to_err(rc) == -EBUSY) {
|
if (pseries_status_to_err(rc) == -EBUSY) {
|
||||||
int delay_ms = get_longbusy_msecs(rc);
|
int delay_us = get_longbusy_msecs(rc) * 1000;
|
||||||
mdelay(delay_ms);
|
|
||||||
timeout += delay_ms;
|
fsleep(delay_us);
|
||||||
|
timeout += delay_us;
|
||||||
}
|
}
|
||||||
rc = pseries_status_to_err(rc);
|
rc = pseries_status_to_err(rc);
|
||||||
} while (rc == -EBUSY && timeout < PLPKS_MAX_TIMEOUT);
|
} while (rc == -EBUSY && timeout < PLPKS_MAX_TIMEOUT);
|
||||||
|
|||||||
Reference in New Issue
Block a user