History

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

Linus Torvalds committed 2 years ago

Commit ef095252 parents d099637 49a940d3 files · +15 −8Browse files

Unified · Split

3 files
  1. arch/powerpc/include/asm/plpks.h +2 −3
  2. arch/powerpc/platforms/pseries/iommu.c +8 −0
  3. arch/powerpc/platforms/pseries/plpks.c +5 −5
arch/powerpc/include/asm/plpks.h+2−3
@@ -44,9 +44,8 @@ · 43 unmodified lines
44#define PLPKS_MAX_DATA_SIZE 400044#define PLPKS_MAX_DATA_SIZE 4000
45 45
46// Timeouts for PLPKS operations46// Timeouts for PLPKS operations
47#define PLPKS_MAX_TIMEOUT 5000 // msec47#define PLPKS_MAX_TIMEOUT (5 * USEC_PER_SEC)
48#define PLPKS_FLUSH_SLEEP 10 // msec48#define PLPKS_FLUSH_SLEEP 10000 // usec
49#define PLPKS_FLUSH_SLEEP_RANGE 400
50 49
51struct plpks_var {50struct plpks_var {
52 char *component;51 char *component;
arch/powerpc/platforms/pseries/iommu.c+8−0
@@ -786,8 +786,16 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus) · 785 unmodified lines
786 * parent bus. During reboot, there will be ibm,dma-window property to786 * parent bus. During reboot, there will be ibm,dma-window property to
787 * define DMA window. For kdump, there will at least be default window or DDW787 * define DMA window. For kdump, there will at least be default window or DDW
788 * or both.788 * or both.
789 * There is an exception to the above. In case the PE goes into frozen
790 * state, firmware may not provide ibm,dma-window property at the time
791 * of LPAR boot up.
789 */792 */
790 793
794 if (!pdn) {
795 pr_debug(" no ibm,dma-window property !\n");
796 return;
797 }
798
791 ppci = PCI_DN(pdn);799 ppci = PCI_DN(pdn);
792 800
793 pr_debug(" parent is %pOF, iommu_table: 0x%p\n",801 pr_debug(" parent is %pOF, iommu_table: 0x%p\n",
arch/powerpc/platforms/pseries/plpks.c+5−5
@@ -415,8 +415,7 @@ static int plpks_confirm_object_flushed(struct label *label, · 414 unmodified lines
415 break;415 break;
416 }416 }
417 417
418 usleep_range(PLPKS_FLUSH_SLEEP,418 fsleep(PLPKS_FLUSH_SLEEP);
419 PLPKS_FLUSH_SLEEP + PLPKS_FLUSH_SLEEP_RANGE);
420 timeout = timeout + PLPKS_FLUSH_SLEEP;419 timeout = timeout + PLPKS_FLUSH_SLEEP;
421 } while (timeout < PLPKS_MAX_TIMEOUT);420 } while (timeout < PLPKS_MAX_TIMEOUT);
422 421
@@ -464,9 +463,10 @@ int plpks_signed_update_var(struct plpks_var *var, u64 flags) · 41 unmodified lines
464 463
465 continuetoken = retbuf[0];464 continuetoken = retbuf[0];
466 if (pseries_status_to_err(rc) == -EBUSY) {465 if (pseries_status_to_err(rc) == -EBUSY) {
467 int delay_ms = get_longbusy_msecs(rc);466 int delay_us = get_longbusy_msecs(rc) * 1000;
468 mdelay(delay_ms);467
469 timeout += delay_ms;468 fsleep(delay_us);
469 timeout += delay_us;
470 }470 }
471 rc = pseries_status_to_err(rc);471 rc = pseries_status_to_err(rc);
472 } while (rc == -EBUSY && timeout < PLPKS_MAX_TIMEOUT);472 } while (rc == -EBUSY && timeout < PLPKS_MAX_TIMEOUT);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t