Skip to content

Commit

Permalink
Merge tag 'powerpc-6.9-3' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - Fix wireguard loading failure on pre-Power10 due to Power10 crypto
   routines

 - Fix papr-vpd selftest failure due to missing variable initialization

 - Avoid unnecessary get/put in spapr_tce_platform_iommu_attach_dev()

Thanks to Geetika Moolchandani, Jason Gunthorpe, Michal Suchánek, Nathan
Lynch, and Shivaprasad G Bhat.

* tag 'powerpc-6.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  selftests/powerpc/papr-vpd: Fix missing variable initialization
  powerpc/crypto/chacha-p10: Fix failure on non Power10
  powerpc/iommu: Refactor spapr_tce_platform_iommu_attach_dev()
  • Loading branch information
torvalds committed Apr 20, 2024
2 parents 560d4e7 + 210cfef commit e43afae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 7 additions & 1 deletion arch/powerpc/crypto/chacha-p10-glue.c
Expand Up @@ -197,17 +197,23 @@ static struct skcipher_alg algs[] = {

static int __init chacha_p10_init(void)
{
if (!cpu_has_feature(CPU_FTR_ARCH_31))
return 0;

static_branch_enable(&have_p10);

return crypto_register_skciphers(algs, ARRAY_SIZE(algs));
}

static void __exit chacha_p10_exit(void)
{
if (!static_branch_likely(&have_p10))
return;

crypto_unregister_skciphers(algs, ARRAY_SIZE(algs));
}

module_cpu_feature_match(PPC_MODULE_FEATURE_P10, chacha_p10_init);
module_init(chacha_p10_init);
module_exit(chacha_p10_exit);

MODULE_DESCRIPTION("ChaCha and XChaCha stream ciphers (P10 accelerated)");
Expand Down
7 changes: 3 additions & 4 deletions arch/powerpc/kernel/iommu.c
Expand Up @@ -1285,15 +1285,14 @@ spapr_tce_platform_iommu_attach_dev(struct iommu_domain *platform_domain,
struct device *dev)
{
struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
struct iommu_group *grp = iommu_group_get(dev);
struct iommu_table_group *table_group;
struct iommu_group *grp;

/* At first attach the ownership is already set */
if (!domain) {
iommu_group_put(grp);
if (!domain)
return 0;
}

grp = iommu_group_get(dev);
table_group = iommu_group_get_iommudata(grp);
/*
* The domain being set to PLATFORM from earlier
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
Expand Up @@ -154,7 +154,7 @@ static int dev_papr_vpd_null_handle(void)
static int papr_vpd_close_handle_without_reading(void)
{
const int devfd = open(DEVPATH, O_RDONLY);
struct papr_location_code lc;
struct papr_location_code lc = { .str = "", };
int fd;

SKIP_IF_MSG(devfd < 0 && errno == ENOENT,
Expand Down

0 comments on commit e43afae

Please sign in to comment.