alternative.c (ead5d1f4d877e92c051e1a1ade623d0d30e71619) | alternative.c (0a575497691486a75bdc3ae551094432b0761a84) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Alternative live-patching for parisc. 4 * Copyright (C) 2018 Helge Deller <deller@gmx.de> 5 * 6 */ 7 8#include <asm/processor.h> 9#include <asm/sections.h> 10#include <asm/alternative.h> | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Alternative live-patching for parisc. 4 * Copyright (C) 2018 Helge Deller <deller@gmx.de> 5 * 6 */ 7 8#include <asm/processor.h> 9#include <asm/sections.h> 10#include <asm/alternative.h> |
11#include <asm/cacheflush.h> |
|
11 12#include <linux/module.h> 13 14static int no_alternatives; 15static int __init setup_no_alternatives(char *str) 16{ 17 no_alternatives = 1; 18 return 1; --- 83 unchanged lines hidden (view full) --- 102 103void __init apply_alternatives_all(void) 104{ 105 set_kernel_text_rw(1); 106 107 apply_alternatives((struct alt_instr *) &__alt_instructions, 108 (struct alt_instr *) &__alt_instructions_end, NULL); 109 | 12 13#include <linux/module.h> 14 15static int no_alternatives; 16static int __init setup_no_alternatives(char *str) 17{ 18 no_alternatives = 1; 19 return 1; --- 83 unchanged lines hidden (view full) --- 103 104void __init apply_alternatives_all(void) 105{ 106 set_kernel_text_rw(1); 107 108 apply_alternatives((struct alt_instr *) &__alt_instructions, 109 (struct alt_instr *) &__alt_instructions_end, NULL); 110 |
111 if (cache_info.dc_size == 0 && cache_info.ic_size == 0) { 112 pr_info("alternatives: optimizing cache-flushes.\n"); 113 static_branch_disable(&parisc_has_cache); 114 } 115 if (cache_info.dc_size == 0) 116 static_branch_disable(&parisc_has_dcache); 117 if (cache_info.ic_size == 0) 118 static_branch_disable(&parisc_has_icache); 119 |
|
110 set_kernel_text_rw(0); 111} | 120 set_kernel_text_rw(0); 121} |