Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double declaration of getauxval() for FreeBSD PPC #13936

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

mcmilk
Copy link
Contributor

@mcmilk mcmilk commented Sep 22, 2022

The extern declaration is only for Linux, move this line into the right #ifdef section.

Signed-off-by: Tino Reichardt milky-zfs@mcmilk.de
Closes: 13934

Motivation and Context

Description

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@mmatuska
Copy link
Contributor

To fix the complete build we need more:

in include/os/freebsd/spl/sys/simd_powerpc.h:

  1. there is no <powerpc/cpu.h>, you want <machine/cpu.h>
    or does the build system provide otherwise? In FreeBSD base we need <machine/cpu.h>
  2. you are missing an #endif at the end of the file

#ifndef _FREEBSD_SIMD_POWERPC_H
#define _FREEBSD_SIMD_POWERPC_H
#include <sys/types.h>
#include <sys/cdefs.h>
#include <machine/pcb.h>
#include <powerpc/cpu.h>
#define kfpu_allowed() 1
#define kfpu_initialize(tsk) do {} while (0)
#define kfpu_begin() do {} while (0)
#define kfpu_end() do {} while (0)
#define kfpu_init() (0)
#define kfpu_fini() do {} while (0)
/*
* Check if Altivec is available
*/
static inline boolean_t
zfs_altivec_available(void)
{
return ((cpu_features & PPC_FEATURE_HAS_ALTIVEC) != 0);
}
/*
* Check if VSX is available
*/
static inline boolean_t
zfs_vsx_available(void)
{
return ((cpu_features & PPC_FEATURE_HAS_VSX) != 0);
}
/*
* Check if POWER ISA 2.07 is available (SHA2)
*/
static inline boolean_t
zfs_isa207_available(void)
{
return ((cpu_features2 & PPC_FEATURE2_ARCH_2_07) != 0);
}

The extern declaration is only for Linux, move this line
into the right #ifdef section.

Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes: 13934
@ghost ghost added the Status: Accepted Ready to integrate (reviewed, tested) label Sep 22, 2022
@behlendorf
Copy link
Contributor

@mmatuska once you're certain this PR is sufficient to resolve the build issue can you please approve it. Then I'll know it's ready to merge.

@mmatuska
Copy link
Contributor

@behlendorf I approve the PR, we have it already in FreeBSD base

@behlendorf behlendorf merged commit bf5b42f into openzfs:master Sep 26, 2022
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 28, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 28, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Sep 28, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 1, 2022
The extern declaration is only for Linux, move this line
into the right #ifdef section.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes openzfs#13934
Closes openzfs#13936
@mcmilk mcmilk deleted the freebsd-ppc branch March 2, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants