From 8279e529d524bce56fca20f6ece0e6f92b0f7aba Mon Sep 17 00:00:00 2001 From: Reza Arbab Date: Wed, 17 Jul 2019 15:44:22 -0500 Subject: npu2: Prepare purge_l2_l3_caches() for reuse Move this to a separate compilation unit with its own header, for reuse. The code formerly in npu2.c is copied verbatim. The #defines formerly in npu2-regs.h have been reformatted and changed to use PPC_BITMASK() instead of multiple consecutive PPC_BIT()s. Signed-off-by: Reza Arbab Reviewed-by: Andrew Donnellan Reviewed-by: Alexey Kardashevskiy Reviewed-by: Stewart Smith Signed-off-by: Oliver O'Halloran --- include/cache-p9.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/cache-p9.h (limited to 'include/cache-p9.h') diff --git a/include/cache-p9.h b/include/cache-p9.h new file mode 100644 index 0000000..e763433 --- /dev/null +++ b/include/cache-p9.h @@ -0,0 +1,22 @@ +/* Copyright 2019 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __CACHE_P9_H +#define __CACHE_P9_H + +int64_t purge_l2_l3_caches(void); + +#endif -- cgit v1.1