diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 21:15:38 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-11 21:15:38 -0500 |
| commit | d3f180ea1a44aecba1b0dab2a253428e77f906bf (patch) | |
| tree | 0be6eaf1eb3fd32c934bd070a3d758696f417c93 /arch/powerpc/include/asm | |
| parent | 6b00f7efb5303418c231994c91fb8239f5ada260 (diff) | |
| parent | a6130ed253a931d2169c26ab0958d81b0dce4d6e (diff) | |
Merge tag 'powerpc-3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc updates from Michael Ellerman:
- Update of all defconfigs
- Addition of a bunch of config options to modernise our defconfigs
- Some PS3 updates from Geoff
- Optimised memcmp for 64 bit from Anton
- Fix for kprobes that allows 'perf probe' to work from Naveen
- Several cxl updates from Ian & Ryan
- Expanded support for the '24x7' PMU from Cody & Sukadev
- Freescale updates from Scott:
"Highlights include 8xx optimizations, some more work on datapath
device tree content, e300 machine check support, t1040 corenet
error reporting, and various cleanups and fixes"
* tag 'powerpc-3.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (102 commits)
cxl: Add missing return statement after handling AFU errror
cxl: Fail AFU initialisation if an invalid configuration record is found
cxl: Export optional AFU configuration record in sysfs
powerpc/mm: Warn on flushing tlb page in kernel context
powerpc/powernv: Add OPAL soft-poweroff routine
powerpc/perf/hv-24x7: Document sysfs event description entries
powerpc/perf/hv-gpci: add the remaining gpci requests
powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated
powerpc/perf/hv-24x7: parse catalog and populate sysfs with events
perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper
perf: add PMU_EVENT_ATTR_STRING() helper
perf: provide sysfs_show for struct perf_pmu_events_attr
powerpc/kernel: Avoid initializing device-tree pointer twice
powerpc: Remove old compile time disabled syscall tracing code
powerpc/kernel: Make syscall_exit a local label
cxl: Fix device_node reference counting
powerpc/mm: bail out early when flushing TLB page
powerpc: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
perf/powerpc: reset event hw state when adding it to the PMU
powerpc/qe: Use strlcpy()
...
Diffstat (limited to 'arch/powerpc/include/asm')
| -rw-r--r-- | arch/powerpc/include/asm/cputable.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/eeh.h | 13 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/kprobes.h | 63 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/opal.h | 10 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/pci-bridge.h | 4 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/pgtable-ppc32.h | 23 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/pgtable.h | 7 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/pnv-pci.h | 4 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/pte-8xx.h | 9 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/pte-common.h | 25 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/rtas.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/smp.h | 1 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/thread_info.h | 2 |
13 files changed, 107 insertions, 58 deletions
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 22d5a7da9e68..5cf5a6d10685 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
| @@ -165,7 +165,7 @@ extern const char *powerpc_base_platform; | |||
| 165 | #define CPU_FTR_ARCH_201 LONG_ASM_CONST(0x0000000200000000) | 165 | #define CPU_FTR_ARCH_201 LONG_ASM_CONST(0x0000000200000000) |
| 166 | #define CPU_FTR_ARCH_206 LONG_ASM_CONST(0x0000000400000000) | 166 | #define CPU_FTR_ARCH_206 LONG_ASM_CONST(0x0000000400000000) |
| 167 | #define CPU_FTR_ARCH_207S LONG_ASM_CONST(0x0000000800000000) | 167 | #define CPU_FTR_ARCH_207S LONG_ASM_CONST(0x0000000800000000) |
| 168 | #define CPU_FTR_IABR LONG_ASM_CONST(0x0000001000000000) | 168 | /* Free LONG_ASM_CONST(0x0000001000000000) */ |
| 169 | #define CPU_FTR_MMCRA LONG_ASM_CONST(0x0000002000000000) | 169 | #define CPU_FTR_MMCRA LONG_ASM_CONST(0x0000002000000000) |
| 170 | #define CPU_FTR_CTRL LONG_ASM_CONST(0x0000004000000000) | 170 | #define CPU_FTR_CTRL LONG_ASM_CONST(0x0000004000000000) |
| 171 | #define CPU_FTR_SMT LONG_ASM_CONST(0x0000008000000000) | 171 | #define CPU_FTR_SMT LONG_ASM_CONST(0x0000008000000000) |
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index 0652ebe117af..55abfd09e47f 100644 --- a/arch/powerpc/include/asm/eeh.h +++ b/arch/powerpc/include/asm/eeh.h | |||
| @@ -38,8 +38,9 @@ struct device_node; | |||
| 38 | #define EEH_FORCE_DISABLED 0x02 /* EEH disabled */ | 38 | #define EEH_FORCE_DISABLED 0x02 /* EEH disabled */ |
| 39 | #define EEH_PROBE_MODE_DEV 0x04 /* From PCI device */ | 39 | #define EEH_PROBE_MODE_DEV 0x04 /* From PCI device */ |
| 40 | #define EEH_PROBE_MODE_DEVTREE 0x08 /* From device tree */ | 40 | #define EEH_PROBE_MODE_DEVTREE 0x08 /* From device tree */ |
| 41 | #define EEH_ENABLE_IO_FOR_LOG 0x10 /* Enable IO for log */ | 41 | #define EEH_VALID_PE_ZERO 0x10 /* PE#0 is valid */ |
| 42 | #define EEH_EARLY_DUMP_LOG 0x20 /* Dump log immediately */ | 42 | #define EEH_ENABLE_IO_FOR_LOG 0x20 /* Enable IO for log */ |
| 43 | #define EEH_EARLY_DUMP_LOG 0x40 /* Dump log immediately */ | ||
| 43 | 44 | ||
| 44 | /* | 45 | /* |
| 45 | * Delay for PE reset, all in ms | 46 | * Delay for PE reset, all in ms |
| @@ -77,6 +78,7 @@ struct device_node; | |||
| 77 | 78 | ||
| 78 | #define EEH_PE_KEEP (1 << 8) /* Keep PE on hotplug */ | 79 | #define EEH_PE_KEEP (1 << 8) /* Keep PE on hotplug */ |
| 79 | #define EEH_PE_CFG_RESTRICTED (1 << 9) /* Block config on error */ | 80 | #define EEH_PE_CFG_RESTRICTED (1 << 9) /* Block config on error */ |
| 81 | #define EEH_PE_REMOVED (1 << 10) /* Removed permanently */ | ||
| 80 | 82 | ||
| 81 | struct eeh_pe { | 83 | struct eeh_pe { |
| 82 | int type; /* PE type: PHB/Bus/Device */ | 84 | int type; /* PE type: PHB/Bus/Device */ |
| @@ -216,6 +218,7 @@ struct eeh_ops { | |||
| 216 | }; | 218 | }; |
| 217 | 219 | ||
| 218 | extern int eeh_subsystem_flags; | 220 | extern int eeh_subsystem_flags; |
| 221 | extern int eeh_max_freezes; | ||
| 219 | extern struct eeh_ops *eeh_ops; | 222 | extern struct eeh_ops *eeh_ops; |
| 220 | extern raw_spinlock_t confirm_error_lock; | 223 | extern raw_spinlock_t confirm_error_lock; |
| 221 | 224 | ||
| @@ -253,12 +256,6 @@ static inline void eeh_serialize_unlock(unsigned long flags) | |||
| 253 | raw_spin_unlock_irqrestore(&confirm_error_lock, flags); | 256 | raw_spin_unlock_irqrestore(&confirm_error_lock, flags); |
| 254 | } | 257 | } |
| 255 | 258 | ||
| 256 | /* | ||
| 257 | * Max number of EEH freezes allowed before we consider the device | ||
| 258 | * to be permanently disabled. | ||
| 259 | */ | ||
| 260 | #define EEH_MAX_ALLOWED_FREEZES 5 | ||
| 261 | |||
| 262 | typedef void *(*eeh_traverse_func)(void *data, void *flag); | 259 | typedef void *(*eeh_traverse_func)(void *data, void *flag); |
| 263 | void eeh_set_pe_aux_size(int size); | 260 | void eeh_set_pe_aux_size(int size); |
| 264 | int eeh_phb_pe_create(struct pci_controller *phb); | 261 | int eeh_phb_pe_create(struct pci_controller *phb); |
diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h index af15d4d8d604..039b583db029 100644 --- a/arch/powerpc/include/asm/kprobes.h +++ b/arch/powerpc/include/asm/kprobes.h | |||
| @@ -41,34 +41,59 @@ typedef ppc_opcode_t kprobe_opcode_t; | |||
| 41 | #define MAX_INSN_SIZE 1 | 41 | #define MAX_INSN_SIZE 1 |
| 42 | 42 | ||
| 43 | #ifdef CONFIG_PPC64 | 43 | #ifdef CONFIG_PPC64 |
| 44 | #if defined(_CALL_ELF) && _CALL_ELF == 2 | ||
| 45 | /* PPC64 ABIv2 needs local entry point */ | ||
| 46 | #define kprobe_lookup_name(name, addr) \ | ||
| 47 | { \ | ||
| 48 | addr = (kprobe_opcode_t *)kallsyms_lookup_name(name); \ | ||
| 49 | if (addr) \ | ||
| 50 | addr = (kprobe_opcode_t *)ppc_function_entry(addr); \ | ||
| 51 | } | ||
| 52 | #else | ||
| 44 | /* | 53 | /* |
| 45 | * 64bit powerpc uses function descriptors. | 54 | * 64bit powerpc ABIv1 uses function descriptors: |
| 46 | * Handle cases where: | 55 | * - Check for the dot variant of the symbol first. |
| 47 | * - User passes a <.symbol> or <module:.symbol> | 56 | * - If that fails, try looking up the symbol provided. |
| 48 | * - User passes a <symbol> or <module:symbol> | 57 | * |
| 49 | * - User passes a non-existent symbol, kallsyms_lookup_name | 58 | * This ensures we always get to the actual symbol and not the descriptor. |
| 50 | * returns 0. Don't deref the NULL pointer in that case | 59 | * Also handle <module:symbol> format. |
| 51 | */ | 60 | */ |
| 52 | #define kprobe_lookup_name(name, addr) \ | 61 | #define kprobe_lookup_name(name, addr) \ |
| 53 | { \ | 62 | { \ |
| 54 | addr = (kprobe_opcode_t *)kallsyms_lookup_name(name); \ | 63 | char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \ |
| 55 | if (addr) { \ | 64 | char *modsym; \ |
| 56 | char *colon; \ | 65 | bool dot_appended = false; \ |
| 57 | if ((colon = strchr(name, ':')) != NULL) { \ | 66 | if ((modsym = strchr(name, ':')) != NULL) { \ |
| 58 | colon++; \ | 67 | modsym++; \ |
| 59 | if (*colon != '\0' && *colon != '.') \ | 68 | if (*modsym != '\0' && *modsym != '.') { \ |
| 60 | addr = (kprobe_opcode_t *)ppc_function_entry(addr); \ | 69 | /* Convert to <module:.symbol> */ \ |
| 61 | } else if (name[0] != '.') \ | 70 | strncpy(dot_name, name, modsym - name); \ |
| 62 | addr = (kprobe_opcode_t *)ppc_function_entry(addr); \ | 71 | dot_name[modsym - name] = '.'; \ |
| 63 | } else { \ | 72 | dot_name[modsym - name + 1] = '\0'; \ |
| 64 | char dot_name[KSYM_NAME_LEN]; \ | 73 | strncat(dot_name, modsym, \ |
| 74 | sizeof(dot_name) - (modsym - name) - 2);\ | ||
| 75 | dot_appended = true; \ | ||
| 76 | } else { \ | ||
| 77 | dot_name[0] = '\0'; \ | ||
| 78 | strncat(dot_name, name, sizeof(dot_name) - 1); \ | ||
| 79 | } \ | ||
| 80 | } else if (name[0] != '.') { \ | ||
| 65 | dot_name[0] = '.'; \ | 81 | dot_name[0] = '.'; \ |
| 66 | dot_name[1] = '\0'; \ | 82 | dot_name[1] = '\0'; \ |
| 67 | strncat(dot_name, name, KSYM_NAME_LEN - 2); \ | 83 | strncat(dot_name, name, KSYM_NAME_LEN - 2); \ |
| 68 | addr = (kprobe_opcode_t *)kallsyms_lookup_name(dot_name); \ | 84 | dot_appended = true; \ |
| 85 | } else { \ | ||
| 86 | dot_name[0] = '\0'; \ | ||
| 87 | strncat(dot_name, name, KSYM_NAME_LEN - 1); \ | ||
| 88 | } \ | ||
| 89 | addr = (kprobe_opcode_t *)kallsyms_lookup_name(dot_name); \ | ||
| 90 | if (!addr && dot_appended) { \ | ||
| 91 | /* Let's try the original non-dot symbol lookup */ \ | ||
| 92 | addr = (kprobe_opcode_t *)kallsyms_lookup_name(name); \ | ||
| 69 | } \ | 93 | } \ |
| 70 | } | 94 | } |
| 71 | #endif | 95 | #endif /* defined(_CALL_ELF) && _CALL_ELF == 2 */ |
| 96 | #endif /* CONFIG_PPC64 */ | ||
| 72 | 97 | ||
| 73 | #define flush_insn_slot(p) do { } while (0) | 98 | #define flush_insn_slot(p) do { } while (0) |
| 74 | #define kretprobe_blacklist_size 0 | 99 | #define kretprobe_blacklist_size 0 |
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index eb95b675109b..9ee0a30a02ce 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h | |||
| @@ -304,7 +304,7 @@ enum OpalMessageType { | |||
| 304 | */ | 304 | */ |
| 305 | OPAL_MSG_MEM_ERR, | 305 | OPAL_MSG_MEM_ERR, |
| 306 | OPAL_MSG_EPOW, | 306 | OPAL_MSG_EPOW, |
| 307 | OPAL_MSG_SHUTDOWN, | 307 | OPAL_MSG_SHUTDOWN, /* params[0] = 1 reboot, 0 shutdown */ |
| 308 | OPAL_MSG_HMI_EVT, | 308 | OPAL_MSG_HMI_EVT, |
| 309 | OPAL_MSG_TYPE_MAX, | 309 | OPAL_MSG_TYPE_MAX, |
| 310 | }; | 310 | }; |
| @@ -595,6 +595,14 @@ enum { | |||
| 595 | OPAL_PHB3_NUM_PEST_REGS = 256 | 595 | OPAL_PHB3_NUM_PEST_REGS = 256 |
| 596 | }; | 596 | }; |
| 597 | 597 | ||
| 598 | /* CAPI modes for PHB */ | ||
| 599 | enum { | ||
| 600 | OPAL_PHB_CAPI_MODE_PCIE = 0, | ||
| 601 | OPAL_PHB_CAPI_MODE_CAPI = 1, | ||
| 602 | OPAL_PHB_CAPI_MODE_SNOOP_OFF = 2, | ||
| 603 | OPAL_PHB_CAPI_MODE_SNOOP_ON = 3, | ||
| 604 | }; | ||
| 605 | |||
| 598 | struct OpalIoPhbErrorCommon { | 606 | struct OpalIoPhbErrorCommon { |
| 599 | __be32 version; | 607 | __be32 version; |
| 600 | __be32 ioType; | 608 | __be32 ioType; |
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index 725247beebec..546d036fe925 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
| @@ -119,6 +119,10 @@ extern void setup_indirect_pci(struct pci_controller* hose, | |||
| 119 | extern int indirect_read_config(struct pci_bus *bus, unsigned int devfn, | 119 | extern int indirect_read_config(struct pci_bus *bus, unsigned int devfn, |
| 120 | int offset, int len, u32 *val); | 120 | int offset, int len, u32 *val); |
| 121 | 121 | ||
| 122 | extern int __indirect_read_config(struct pci_controller *hose, | ||
| 123 | unsigned char bus_number, unsigned int devfn, | ||
| 124 | int offset, int len, u32 *val); | ||
| 125 | |||
| 122 | extern int indirect_write_config(struct pci_bus *bus, unsigned int devfn, | 126 | extern int indirect_write_config(struct pci_bus *bus, unsigned int devfn, |
| 123 | int offset, int len, u32 val); | 127 | int offset, int len, u32 val); |
| 124 | 128 | ||
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h index 234e07c47803..26ce0ab0a9e4 100644 --- a/arch/powerpc/include/asm/pgtable-ppc32.h +++ b/arch/powerpc/include/asm/pgtable-ppc32.h | |||
| @@ -178,12 +178,11 @@ static inline unsigned long pte_update(pte_t *p, | |||
| 178 | andc %1,%0,%5\n\ | 178 | andc %1,%0,%5\n\ |
| 179 | or %1,%1,%6\n\ | 179 | or %1,%1,%6\n\ |
| 180 | /* 0x200 == Extended encoding, bit 22 */ \ | 180 | /* 0x200 == Extended encoding, bit 22 */ \ |
| 181 | /* Bit 22 has to be 1 if neither _PAGE_USER nor _PAGE_RW are set */ \ | 181 | /* Bit 22 has to be 1 when _PAGE_USER is unset and _PAGE_RO is set */ \ |
| 182 | rlwimi %1,%1,32-2,0x200\n /* get _PAGE_USER */ \ | 182 | rlwimi %1,%1,32-1,0x200\n /* get _PAGE_RO */ \ |
| 183 | rlwinm %3,%1,32-1,0x200\n /* get _PAGE_RW */ \ | 183 | rlwinm %3,%1,32-2,0x200\n /* get _PAGE_USER */ \ |
| 184 | or %1,%3,%1\n\ | 184 | andc %1,%1,%3\n\ |
| 185 | xori %1,%1,0x200\n" | 185 | stwcx. %1,0,%4\n\ |
| 186 | " stwcx. %1,0,%4\n\ | ||
| 187 | bne- 1b" | 186 | bne- 1b" |
| 188 | : "=&r" (old), "=&r" (tmp), "=m" (*p), "=&r" (tmp2) | 187 | : "=&r" (old), "=&r" (tmp), "=m" (*p), "=&r" (tmp2) |
| 189 | : "r" (p), "r" (clr), "r" (set), "m" (*p) | 188 | : "r" (p), "r" (clr), "r" (set), "m" (*p) |
| @@ -275,7 +274,7 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
| 275 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | 274 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, |
| 276 | pte_t *ptep) | 275 | pte_t *ptep) |
| 277 | { | 276 | { |
| 278 | pte_update(ptep, (_PAGE_RW | _PAGE_HWWRITE), 0); | 277 | pte_update(ptep, (_PAGE_RW | _PAGE_HWWRITE), _PAGE_RO); |
| 279 | } | 278 | } |
| 280 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | 279 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, |
| 281 | unsigned long addr, pte_t *ptep) | 280 | unsigned long addr, pte_t *ptep) |
| @@ -286,9 +285,11 @@ static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | |||
| 286 | 285 | ||
| 287 | static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) | 286 | static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) |
| 288 | { | 287 | { |
| 289 | unsigned long bits = pte_val(entry) & | 288 | unsigned long set = pte_val(entry) & |
| 290 | (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC); | 289 | (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC); |
| 291 | pte_update(ptep, 0, bits); | 290 | unsigned long clr = ~pte_val(entry) & _PAGE_RO; |
| 291 | |||
| 292 | pte_update(ptep, clr, set); | ||
| 292 | } | 293 | } |
| 293 | 294 | ||
| 294 | #define __HAVE_ARCH_PTE_SAME | 295 | #define __HAVE_ARCH_PTE_SAME |
| @@ -346,10 +347,14 @@ static inline void __ptep_set_access_flags(pte_t *ptep, pte_t entry) | |||
| 346 | #define pte_to_pgoff(pte) (pte_val(pte) >> 3) | 347 | #define pte_to_pgoff(pte) (pte_val(pte) >> 3) |
| 347 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) | 348 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) |
| 348 | 349 | ||
| 350 | #ifndef CONFIG_PPC_4K_PAGES | ||
| 351 | void pgtable_cache_init(void); | ||
| 352 | #else | ||
| 349 | /* | 353 | /* |
| 350 | * No page table caches to initialise | 354 | * No page table caches to initialise |
| 351 | */ | 355 | */ |
| 352 | #define pgtable_cache_init() do { } while (0) | 356 | #define pgtable_cache_init() do { } while (0) |
| 357 | #endif | ||
| 353 | 358 | ||
| 354 | extern int get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep, | 359 | extern int get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep, |
| 355 | pmd_t **pmdp); | 360 | pmd_t **pmdp); |
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index a8805fee0df9..7e77f2ca5132 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h | |||
| @@ -30,7 +30,8 @@ struct mm_struct; | |||
| 30 | #include <asm/tlbflush.h> | 30 | #include <asm/tlbflush.h> |
| 31 | 31 | ||
| 32 | /* Generic accessors to PTE bits */ | 32 | /* Generic accessors to PTE bits */ |
| 33 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 33 | static inline int pte_write(pte_t pte) |
| 34 | { return (pte_val(pte) & (_PAGE_RW | _PAGE_RO)) != _PAGE_RO; } | ||
| 34 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 35 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
| 35 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 36 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
| 36 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 37 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
| @@ -115,12 +116,14 @@ static inline unsigned long pte_pfn(pte_t pte) { | |||
| 115 | 116 | ||
| 116 | /* Generic modifiers for PTE bits */ | 117 | /* Generic modifiers for PTE bits */ |
| 117 | static inline pte_t pte_wrprotect(pte_t pte) { | 118 | static inline pte_t pte_wrprotect(pte_t pte) { |
| 118 | pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; } | 119 | pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); |
| 120 | pte_val(pte) |= _PAGE_RO; return pte; } | ||
| 119 | static inline pte_t pte_mkclean(pte_t pte) { | 121 | static inline pte_t pte_mkclean(pte_t pte) { |
| 120 | pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; } | 122 | pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; } |
| 121 | static inline pte_t pte_mkold(pte_t pte) { | 123 | static inline pte_t pte_mkold(pte_t pte) { |
| 122 | pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } | 124 | pte_val(pte) &= ~_PAGE_ACCESSED; return pte; } |
| 123 | static inline pte_t pte_mkwrite(pte_t pte) { | 125 | static inline pte_t pte_mkwrite(pte_t pte) { |
| 126 | pte_val(pte) &= ~_PAGE_RO; | ||
| 124 | pte_val(pte) |= _PAGE_RW; return pte; } | 127 | pte_val(pte) |= _PAGE_RW; return pte; } |
| 125 | static inline pte_t pte_mkdirty(pte_t pte) { | 128 | static inline pte_t pte_mkdirty(pte_t pte) { |
| 126 | pte_val(pte) |= _PAGE_DIRTY; return pte; } | 129 | pte_val(pte) |= _PAGE_DIRTY; return pte; } |
diff --git a/arch/powerpc/include/asm/pnv-pci.h b/arch/powerpc/include/asm/pnv-pci.h index f09a22fa1bd7..f9b498292a5c 100644 --- a/arch/powerpc/include/asm/pnv-pci.h +++ b/arch/powerpc/include/asm/pnv-pci.h | |||
| @@ -13,13 +13,13 @@ | |||
| 13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
| 14 | #include <misc/cxl.h> | 14 | #include <misc/cxl.h> |
| 15 | 15 | ||
| 16 | int pnv_phb_to_cxl(struct pci_dev *dev); | 16 | int pnv_phb_to_cxl_mode(struct pci_dev *dev, uint64_t mode); |
| 17 | int pnv_cxl_ioda_msi_setup(struct pci_dev *dev, unsigned int hwirq, | 17 | int pnv_cxl_ioda_msi_setup(struct pci_dev *dev, unsigned int hwirq, |
| 18 | unsigned int virq); | 18 | unsigned int virq); |
| 19 | int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num); | 19 | int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num); |
| 20 | void pnv_cxl_release_hwirqs(struct pci_dev *dev, int hwirq, int num); | 20 | void pnv_cxl_release_hwirqs(struct pci_dev *dev, int hwirq, int num); |
| 21 | int pnv_cxl_get_irq_count(struct pci_dev *dev); | 21 | int pnv_cxl_get_irq_count(struct pci_dev *dev); |
| 22 | struct device_node *pnv_pci_to_phb_node(struct pci_dev *dev); | 22 | struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev); |
| 23 | 23 | ||
| 24 | #ifdef CONFIG_CXL_BASE | 24 | #ifdef CONFIG_CXL_BASE |
| 25 | int pnv_cxl_alloc_hwirq_ranges(struct cxl_irq_ranges *irqs, | 25 | int pnv_cxl_alloc_hwirq_ranges(struct cxl_irq_ranges *irqs, |
diff --git a/arch/powerpc/include/asm/pte-8xx.h b/arch/powerpc/include/asm/pte-8xx.h index daa4616e61c4..eb6edb44f140 100644 --- a/arch/powerpc/include/asm/pte-8xx.h +++ b/arch/powerpc/include/asm/pte-8xx.h | |||
| @@ -46,9 +46,9 @@ | |||
| 46 | * require a TLB exception handler change. It is assumed unused bits | 46 | * require a TLB exception handler change. It is assumed unused bits |
| 47 | * are always zero. | 47 | * are always zero. |
| 48 | */ | 48 | */ |
| 49 | #define _PAGE_RW 0x0400 /* lsb PP bits, inverted in HW */ | 49 | #define _PAGE_RO 0x0400 /* lsb PP bits */ |
| 50 | #define _PAGE_USER 0x0800 /* msb PP bits */ | 50 | #define _PAGE_USER 0x0800 /* msb PP bits */ |
| 51 | /* set when neither _PAGE_USER nor _PAGE_RW are set */ | 51 | /* set when _PAGE_USER is unset and _PAGE_RO is set */ |
| 52 | #define _PAGE_KNLRO 0x0200 | 52 | #define _PAGE_KNLRO 0x0200 |
| 53 | 53 | ||
| 54 | #define _PMD_PRESENT 0x0001 | 54 | #define _PMD_PRESENT 0x0001 |
| @@ -62,9 +62,8 @@ | |||
| 62 | #define PTE_ATOMIC_UPDATES 1 | 62 | #define PTE_ATOMIC_UPDATES 1 |
| 63 | 63 | ||
| 64 | /* We need to add _PAGE_SHARED to kernel pages */ | 64 | /* We need to add _PAGE_SHARED to kernel pages */ |
| 65 | #define _PAGE_KERNEL_RO (_PAGE_SHARED | _PAGE_KNLRO) | 65 | #define _PAGE_KERNEL_RO (_PAGE_SHARED | _PAGE_RO | _PAGE_KNLRO) |
| 66 | #define _PAGE_KERNEL_ROX (_PAGE_EXEC | _PAGE_KNLRO) | 66 | #define _PAGE_KERNEL_ROX (_PAGE_EXEC | _PAGE_RO | _PAGE_KNLRO) |
| 67 | #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) | ||
| 68 | 67 | ||
| 69 | #endif /* __KERNEL__ */ | 68 | #endif /* __KERNEL__ */ |
| 70 | #endif /* _ASM_POWERPC_PTE_8xx_H */ | 69 | #endif /* _ASM_POWERPC_PTE_8xx_H */ |
diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h index e040c3595129..2aef9b7a0eb2 100644 --- a/arch/powerpc/include/asm/pte-common.h +++ b/arch/powerpc/include/asm/pte-common.h | |||
| @@ -34,6 +34,12 @@ | |||
| 34 | #ifndef _PAGE_PSIZE | 34 | #ifndef _PAGE_PSIZE |
| 35 | #define _PAGE_PSIZE 0 | 35 | #define _PAGE_PSIZE 0 |
| 36 | #endif | 36 | #endif |
| 37 | /* _PAGE_RO and _PAGE_RW shall not be defined at the same time */ | ||
| 38 | #ifndef _PAGE_RO | ||
| 39 | #define _PAGE_RO 0 | ||
| 40 | #else | ||
| 41 | #define _PAGE_RW 0 | ||
| 42 | #endif | ||
| 37 | #ifndef _PMD_PRESENT_MASK | 43 | #ifndef _PMD_PRESENT_MASK |
| 38 | #define _PMD_PRESENT_MASK _PMD_PRESENT | 44 | #define _PMD_PRESENT_MASK _PMD_PRESENT |
| 39 | #endif | 45 | #endif |
| @@ -42,10 +48,10 @@ | |||
| 42 | #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() | 48 | #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() |
| 43 | #endif | 49 | #endif |
| 44 | #ifndef _PAGE_KERNEL_RO | 50 | #ifndef _PAGE_KERNEL_RO |
| 45 | #define _PAGE_KERNEL_RO 0 | 51 | #define _PAGE_KERNEL_RO (_PAGE_RO) |
| 46 | #endif | 52 | #endif |
| 47 | #ifndef _PAGE_KERNEL_ROX | 53 | #ifndef _PAGE_KERNEL_ROX |
| 48 | #define _PAGE_KERNEL_ROX (_PAGE_EXEC) | 54 | #define _PAGE_KERNEL_ROX (_PAGE_EXEC | _PAGE_RO) |
| 49 | #endif | 55 | #endif |
| 50 | #ifndef _PAGE_KERNEL_RW | 56 | #ifndef _PAGE_KERNEL_RW |
| 51 | #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) | 57 | #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW | _PAGE_HWWRITE) |
| @@ -95,7 +101,7 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
| 95 | /* Mask of bits returned by pte_pgprot() */ | 101 | /* Mask of bits returned by pte_pgprot() */ |
| 96 | #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ | 102 | #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ |
| 97 | _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \ | 103 | _PAGE_WRITETHRU | _PAGE_ENDIAN | _PAGE_4K_PFN | \ |
| 98 | _PAGE_USER | _PAGE_ACCESSED | \ | 104 | _PAGE_USER | _PAGE_ACCESSED | _PAGE_RO | \ |
| 99 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) | 105 | _PAGE_RW | _PAGE_HWWRITE | _PAGE_DIRTY | _PAGE_EXEC) |
| 100 | 106 | ||
| 101 | #ifdef CONFIG_NUMA_BALANCING | 107 | #ifdef CONFIG_NUMA_BALANCING |
| @@ -128,11 +134,14 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void); | |||
| 128 | */ | 134 | */ |
| 129 | #define PAGE_NONE __pgprot(_PAGE_BASE) | 135 | #define PAGE_NONE __pgprot(_PAGE_BASE) |
| 130 | #define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW) | 136 | #define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW) |
| 131 | #define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC) | 137 | #define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | \ |
| 132 | #define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER) | 138 | _PAGE_EXEC) |
| 133 | #define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC) | 139 | #define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RO) |
| 134 | #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER) | 140 | #define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RO | \ |
| 135 | #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC) | 141 | _PAGE_EXEC) |
| 142 | #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RO) | ||
| 143 | #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RO | \ | ||
| 144 | _PAGE_EXEC) | ||
| 136 | 145 | ||
| 137 | #define __P000 PAGE_NONE | 146 | #define __P000 PAGE_NONE |
| 138 | #define __P001 PAGE_READONLY | 147 | #define __P001 PAGE_READONLY |
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h index b390f55b0df1..2e23e92a4372 100644 --- a/arch/powerpc/include/asm/rtas.h +++ b/arch/powerpc/include/asm/rtas.h | |||
| @@ -327,7 +327,7 @@ extern int rtas_suspend_cpu(struct rtas_suspend_me_data *data); | |||
| 327 | extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data); | 327 | extern int rtas_suspend_last_cpu(struct rtas_suspend_me_data *data); |
| 328 | extern int rtas_online_cpus_mask(cpumask_var_t cpus); | 328 | extern int rtas_online_cpus_mask(cpumask_var_t cpus); |
| 329 | extern int rtas_offline_cpus_mask(cpumask_var_t cpus); | 329 | extern int rtas_offline_cpus_mask(cpumask_var_t cpus); |
| 330 | extern int rtas_ibm_suspend_me(struct rtas_args *); | 330 | extern int rtas_ibm_suspend_me(u64 handle, int *vasi_return); |
| 331 | 331 | ||
| 332 | struct rtc_time; | 332 | struct rtc_time; |
| 333 | extern unsigned long rtas_get_boot_time(void); | 333 | extern unsigned long rtas_get_boot_time(void); |
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 5a6614a7f0b2..d607df5081a7 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h | |||
| @@ -64,7 +64,6 @@ DECLARE_PER_CPU(unsigned int, cpu_pvr); | |||
| 64 | extern void migrate_irqs(void); | 64 | extern void migrate_irqs(void); |
| 65 | int generic_cpu_disable(void); | 65 | int generic_cpu_disable(void); |
| 66 | void generic_cpu_die(unsigned int cpu); | 66 | void generic_cpu_die(unsigned int cpu); |
| 67 | void generic_mach_cpu_die(void); | ||
| 68 | void generic_set_cpu_dead(unsigned int cpu); | 67 | void generic_set_cpu_dead(unsigned int cpu); |
| 69 | void generic_set_cpu_up(unsigned int cpu); | 68 | void generic_set_cpu_up(unsigned int cpu); |
| 70 | int generic_check_cpu_restart(unsigned int cpu); | 69 | int generic_check_cpu_restart(unsigned int cpu); |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 0be6c681cab1..e8abc83e699f 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
| @@ -125,7 +125,7 @@ static inline struct thread_info *current_thread_info(void) | |||
| 125 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) | 125 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) |
| 126 | #define _TIF_EMULATE_STACK_STORE (1<<TIF_EMULATE_STACK_STORE) | 126 | #define _TIF_EMULATE_STACK_STORE (1<<TIF_EMULATE_STACK_STORE) |
| 127 | #define _TIF_NOHZ (1<<TIF_NOHZ) | 127 | #define _TIF_NOHZ (1<<TIF_NOHZ) |
| 128 | #define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ | 128 | #define _TIF_SYSCALL_DOTRACE (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ |
| 129 | _TIF_SECCOMP | _TIF_SYSCALL_TRACEPOINT | \ | 129 | _TIF_SECCOMP | _TIF_SYSCALL_TRACEPOINT | \ |
| 130 | _TIF_NOHZ) | 130 | _TIF_NOHZ) |
| 131 | 131 | ||
