diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-05-05 16:50:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-05-05 16:50:23 -0400 |
commit | aad61439e6a00bdb72cb649e11f6e166590c5f66 (patch) | |
tree | 2279f3c2a15f81526d14182c6acb358cafd0b359 /arch/powerpc/kernel | |
parent | 3c304956755fa63ee80ca51ce38078fe1c4e8818 (diff) | |
parent | d98550e334715b2d9e45f8f0f4e1608720108640 (diff) |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 16 | ||||
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 14 | ||||
-rw-r--r-- | arch/powerpc/kernel/module_64.c | 16 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom.c | 70 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 112 | ||||
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 8 | ||||
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 22 | ||||
-rw-r--r-- | arch/powerpc/kernel/systbl.S | 14 |
10 files changed, 257 insertions, 28 deletions
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 39e348a3ade2..3f7182db9ed5 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -57,6 +57,8 @@ extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); | |||
57 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) | 57 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) |
58 | #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ | 58 | #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ |
59 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) | 59 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) |
60 | #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ | ||
61 | PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) | ||
60 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ | 62 | #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ |
61 | PPC_FEATURE_BOOKE) | 63 | PPC_FEATURE_BOOKE) |
62 | 64 | ||
@@ -263,6 +265,20 @@ struct cpu_spec cpu_specs[] = { | |||
263 | .oprofile_type = PPC_OPROFILE_POWER4, | 265 | .oprofile_type = PPC_OPROFILE_POWER4, |
264 | .platform = "power5+", | 266 | .platform = "power5+", |
265 | }, | 267 | }, |
268 | { /* Power6 */ | ||
269 | .pvr_mask = 0xffff0000, | ||
270 | .pvr_value = 0x003e0000, | ||
271 | .cpu_name = "POWER6", | ||
272 | .cpu_features = CPU_FTRS_POWER6, | ||
273 | .cpu_user_features = COMMON_USER_POWER6, | ||
274 | .icache_bsize = 128, | ||
275 | .dcache_bsize = 128, | ||
276 | .num_pmcs = 6, | ||
277 | .cpu_setup = __setup_cpu_power4, | ||
278 | .oprofile_cpu_type = "ppc64/power6", | ||
279 | .oprofile_type = PPC_OPROFILE_POWER4, | ||
280 | .platform = "power6", | ||
281 | }, | ||
266 | { /* Cell Broadband Engine */ | 282 | { /* Cell Broadband Engine */ |
267 | .pvr_mask = 0xffff0000, | 283 | .pvr_mask = 0xffff0000, |
268 | .pvr_value = 0x00700000, | 284 | .pvr_value = 0x00700000, |
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 856ef1a832b9..f78866367b70 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -90,15 +90,15 @@ void __kprobes arch_remove_kprobe(struct kprobe *p) | |||
90 | 90 | ||
91 | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 91 | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) |
92 | { | 92 | { |
93 | kprobe_opcode_t insn = *p->ainsn.insn; | ||
94 | |||
95 | regs->msr |= MSR_SE; | 93 | regs->msr |= MSR_SE; |
96 | 94 | ||
97 | /* single step inline if it is a trap variant */ | 95 | /* |
98 | if (is_trap(insn)) | 96 | * On powerpc we should single step on the original |
99 | regs->nip = (unsigned long)p->addr; | 97 | * instruction even if the probed insn is a trap |
100 | else | 98 | * variant as values in regs could play a part in |
101 | regs->nip = (unsigned long)p->ainsn.insn; | 99 | * if the trap is taken or not |
100 | */ | ||
101 | regs->nip = (unsigned long)p->ainsn.insn; | ||
102 | } | 102 | } |
103 | 103 | ||
104 | static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb) | 104 | static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb) |
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c index 928b8581fcb0..ba34001fca8e 100644 --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c | |||
@@ -191,11 +191,19 @@ int module_frob_arch_sections(Elf64_Ehdr *hdr, | |||
191 | (void *)hdr | 191 | (void *)hdr |
192 | + sechdrs[sechdrs[i].sh_link].sh_offset); | 192 | + sechdrs[sechdrs[i].sh_link].sh_offset); |
193 | } | 193 | } |
194 | if (!me->arch.stubs_section || !me->arch.toc_section) { | 194 | |
195 | printk("%s: doesn't contain .toc or .stubs.\n", me->name); | 195 | if (!me->arch.stubs_section) { |
196 | printk("%s: doesn't contain .stubs.\n", me->name); | ||
196 | return -ENOEXEC; | 197 | return -ENOEXEC; |
197 | } | 198 | } |
198 | 199 | ||
200 | /* If we don't have a .toc, just use .stubs. We need to set r2 | ||
201 | to some reasonable value in case the module calls out to | ||
202 | other functions via a stub, or if a function pointer escapes | ||
203 | the module by some means. */ | ||
204 | if (!me->arch.toc_section) | ||
205 | me->arch.toc_section = me->arch.stubs_section; | ||
206 | |||
199 | /* Override the stubs size */ | 207 | /* Override the stubs size */ |
200 | sechdrs[me->arch.stubs_section].sh_size = get_stubs_size(hdr, sechdrs); | 208 | sechdrs[me->arch.stubs_section].sh_size = get_stubs_size(hdr, sechdrs); |
201 | return 0; | 209 | return 0; |
@@ -342,7 +350,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, | |||
342 | break; | 350 | break; |
343 | 351 | ||
344 | case R_PPC64_TOC16: | 352 | case R_PPC64_TOC16: |
345 | /* Subtact TOC pointer */ | 353 | /* Subtract TOC pointer */ |
346 | value -= my_r2(sechdrs, me); | 354 | value -= my_r2(sechdrs, me); |
347 | if (value + 0x8000 > 0xffff) { | 355 | if (value + 0x8000 > 0xffff) { |
348 | printk("%s: bad TOC16 relocation (%lu)\n", | 356 | printk("%s: bad TOC16 relocation (%lu)\n", |
@@ -355,7 +363,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, | |||
355 | break; | 363 | break; |
356 | 364 | ||
357 | case R_PPC64_TOC16_DS: | 365 | case R_PPC64_TOC16_DS: |
358 | /* Subtact TOC pointer */ | 366 | /* Subtract TOC pointer */ |
359 | value -= my_r2(sechdrs, me); | 367 | value -= my_r2(sechdrs, me); |
360 | if ((value & 3) != 0 || value + 0x8000 > 0xffff) { | 368 | if ((value & 3) != 0 || value + 0x8000 > 0xffff) { |
361 | printk("%s: bad TOC16_DS relocation (%lu)\n", | 369 | printk("%s: bad TOC16_DS relocation (%lu)\n", |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 1cb69e8fb0b1..9a07f97f0712 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -885,6 +885,74 @@ void __init unflatten_device_tree(void) | |||
885 | DBG(" <- unflatten_device_tree()\n"); | 885 | DBG(" <- unflatten_device_tree()\n"); |
886 | } | 886 | } |
887 | 887 | ||
888 | /* | ||
889 | * ibm,pa-features is a per-cpu property that contains a string of | ||
890 | * attribute descriptors, each of which has a 2 byte header plus up | ||
891 | * to 254 bytes worth of processor attribute bits. First header | ||
892 | * byte specifies the number of bytes following the header. | ||
893 | * Second header byte is an "attribute-specifier" type, of which | ||
894 | * zero is the only currently-defined value. | ||
895 | * Implementation: Pass in the byte and bit offset for the feature | ||
896 | * that we are interested in. The function will return -1 if the | ||
897 | * pa-features property is missing, or a 1/0 to indicate if the feature | ||
898 | * is supported/not supported. Note that the bit numbers are | ||
899 | * big-endian to match the definition in PAPR. | ||
900 | */ | ||
901 | static struct ibm_pa_feature { | ||
902 | unsigned long cpu_features; /* CPU_FTR_xxx bit */ | ||
903 | unsigned int cpu_user_ftrs; /* PPC_FEATURE_xxx bit */ | ||
904 | unsigned char pabyte; /* byte number in ibm,pa-features */ | ||
905 | unsigned char pabit; /* bit number (big-endian) */ | ||
906 | unsigned char invert; /* if 1, pa bit set => clear feature */ | ||
907 | } ibm_pa_features[] __initdata = { | ||
908 | {0, PPC_FEATURE_HAS_MMU, 0, 0, 0}, | ||
909 | {0, PPC_FEATURE_HAS_FPU, 0, 1, 0}, | ||
910 | {CPU_FTR_SLB, 0, 0, 2, 0}, | ||
911 | {CPU_FTR_CTRL, 0, 0, 3, 0}, | ||
912 | {CPU_FTR_NOEXECUTE, 0, 0, 6, 0}, | ||
913 | {CPU_FTR_NODSISRALIGN, 0, 1, 1, 1}, | ||
914 | {CPU_FTR_CI_LARGE_PAGE, 0, 1, 2, 0}, | ||
915 | }; | ||
916 | |||
917 | static void __init check_cpu_pa_features(unsigned long node) | ||
918 | { | ||
919 | unsigned char *pa_ftrs; | ||
920 | unsigned long len, tablelen, i, bit; | ||
921 | |||
922 | pa_ftrs = of_get_flat_dt_prop(node, "ibm,pa-features", &tablelen); | ||
923 | if (pa_ftrs == NULL) | ||
924 | return; | ||
925 | |||
926 | /* find descriptor with type == 0 */ | ||
927 | for (;;) { | ||
928 | if (tablelen < 3) | ||
929 | return; | ||
930 | len = 2 + pa_ftrs[0]; | ||
931 | if (tablelen < len) | ||
932 | return; /* descriptor 0 not found */ | ||
933 | if (pa_ftrs[1] == 0) | ||
934 | break; | ||
935 | tablelen -= len; | ||
936 | pa_ftrs += len; | ||
937 | } | ||
938 | |||
939 | /* loop over bits we know about */ | ||
940 | for (i = 0; i < ARRAY_SIZE(ibm_pa_features); ++i) { | ||
941 | struct ibm_pa_feature *fp = &ibm_pa_features[i]; | ||
942 | |||
943 | if (fp->pabyte >= pa_ftrs[0]) | ||
944 | continue; | ||
945 | bit = (pa_ftrs[2 + fp->pabyte] >> (7 - fp->pabit)) & 1; | ||
946 | if (bit ^ fp->invert) { | ||
947 | cur_cpu_spec->cpu_features |= fp->cpu_features; | ||
948 | cur_cpu_spec->cpu_user_features |= fp->cpu_user_ftrs; | ||
949 | } else { | ||
950 | cur_cpu_spec->cpu_features &= ~fp->cpu_features; | ||
951 | cur_cpu_spec->cpu_user_features &= ~fp->cpu_user_ftrs; | ||
952 | } | ||
953 | } | ||
954 | } | ||
955 | |||
888 | static int __init early_init_dt_scan_cpus(unsigned long node, | 956 | static int __init early_init_dt_scan_cpus(unsigned long node, |
889 | const char *uname, int depth, | 957 | const char *uname, int depth, |
890 | void *data) | 958 | void *data) |
@@ -969,6 +1037,8 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
969 | } | 1037 | } |
970 | #endif /* CONFIG_ALTIVEC */ | 1038 | #endif /* CONFIG_ALTIVEC */ |
971 | 1039 | ||
1040 | check_cpu_pa_features(node); | ||
1041 | |||
972 | #ifdef CONFIG_PPC_PSERIES | 1042 | #ifdef CONFIG_PPC_PSERIES |
973 | if (nthreads > 1) | 1043 | if (nthreads > 1) |
974 | cur_cpu_spec->cpu_features |= CPU_FTR_SMT; | 1044 | cur_cpu_spec->cpu_features |= CPU_FTR_SMT; |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 7e4d54821a07..078fb5533541 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -636,10 +636,96 @@ static void __init early_cmdline_parse(void) | |||
636 | 636 | ||
637 | #ifdef CONFIG_PPC_PSERIES | 637 | #ifdef CONFIG_PPC_PSERIES |
638 | /* | 638 | /* |
639 | * To tell the firmware what our capabilities are, we have to pass | 639 | * There are two methods for telling firmware what our capabilities are. |
640 | * it a fake 32-bit ELF header containing a couple of PT_NOTE sections | 640 | * Newer machines have an "ibm,client-architecture-support" method on the |
641 | * that contain structures that contain the actual values. | 641 | * root node. For older machines, we have to call the "process-elf-header" |
642 | * method in the /packages/elf-loader node, passing it a fake 32-bit | ||
643 | * ELF header containing a couple of PT_NOTE sections that contain | ||
644 | * structures that contain various information. | ||
642 | */ | 645 | */ |
646 | |||
647 | /* | ||
648 | * New method - extensible architecture description vector. | ||
649 | * | ||
650 | * Because the description vector contains a mix of byte and word | ||
651 | * values, we declare it as an unsigned char array, and use this | ||
652 | * macro to put word values in. | ||
653 | */ | ||
654 | #define W(x) ((x) >> 24) & 0xff, ((x) >> 16) & 0xff, \ | ||
655 | ((x) >> 8) & 0xff, (x) & 0xff | ||
656 | |||
657 | /* Option vector bits - generic bits in byte 1 */ | ||
658 | #define OV_IGNORE 0x80 /* ignore this vector */ | ||
659 | #define OV_CESSATION_POLICY 0x40 /* halt if unsupported option present*/ | ||
660 | |||
661 | /* Option vector 1: processor architectures supported */ | ||
662 | #define OV1_PPC_2_00 0x80 /* set if we support PowerPC 2.00 */ | ||
663 | #define OV1_PPC_2_01 0x40 /* set if we support PowerPC 2.01 */ | ||
664 | #define OV1_PPC_2_02 0x20 /* set if we support PowerPC 2.02 */ | ||
665 | #define OV1_PPC_2_03 0x10 /* set if we support PowerPC 2.03 */ | ||
666 | #define OV1_PPC_2_04 0x08 /* set if we support PowerPC 2.04 */ | ||
667 | #define OV1_PPC_2_05 0x04 /* set if we support PowerPC 2.05 */ | ||
668 | |||
669 | /* Option vector 2: Open Firmware options supported */ | ||
670 | #define OV2_REAL_MODE 0x20 /* set if we want OF in real mode */ | ||
671 | |||
672 | /* Option vector 3: processor options supported */ | ||
673 | #define OV3_FP 0x80 /* floating point */ | ||
674 | #define OV3_VMX 0x40 /* VMX/Altivec */ | ||
675 | |||
676 | /* Option vector 5: PAPR/OF options supported */ | ||
677 | #define OV5_LPAR 0x80 /* logical partitioning supported */ | ||
678 | #define OV5_SPLPAR 0x40 /* shared-processor LPAR supported */ | ||
679 | /* ibm,dynamic-reconfiguration-memory property supported */ | ||
680 | #define OV5_DRCONF_MEMORY 0x20 | ||
681 | #define OV5_LARGE_PAGES 0x10 /* large pages supported */ | ||
682 | |||
683 | /* | ||
684 | * The architecture vector has an array of PVR mask/value pairs, | ||
685 | * followed by # option vectors - 1, followed by the option vectors. | ||
686 | */ | ||
687 | static unsigned char ibm_architecture_vec[] = { | ||
688 | W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */ | ||
689 | W(0xffff0000), W(0x003e0000), /* POWER6 */ | ||
690 | W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */ | ||
691 | 5 - 1, /* 5 option vectors */ | ||
692 | |||
693 | /* option vector 1: processor architectures supported */ | ||
694 | 3 - 1, /* length */ | ||
695 | 0, /* don't ignore, don't halt */ | ||
696 | OV1_PPC_2_00 | OV1_PPC_2_01 | OV1_PPC_2_02 | OV1_PPC_2_03 | | ||
697 | OV1_PPC_2_04 | OV1_PPC_2_05, | ||
698 | |||
699 | /* option vector 2: Open Firmware options supported */ | ||
700 | 34 - 1, /* length */ | ||
701 | OV2_REAL_MODE, | ||
702 | 0, 0, | ||
703 | W(0xffffffff), /* real_base */ | ||
704 | W(0xffffffff), /* real_size */ | ||
705 | W(0xffffffff), /* virt_base */ | ||
706 | W(0xffffffff), /* virt_size */ | ||
707 | W(0xffffffff), /* load_base */ | ||
708 | W(64), /* 128MB min RMA */ | ||
709 | W(0xffffffff), /* full client load */ | ||
710 | 0, /* min RMA percentage of total RAM */ | ||
711 | 48, /* max log_2(hash table size) */ | ||
712 | |||
713 | /* option vector 3: processor options supported */ | ||
714 | 3 - 1, /* length */ | ||
715 | 0, /* don't ignore, don't halt */ | ||
716 | OV3_FP | OV3_VMX, | ||
717 | |||
718 | /* option vector 4: IBM PAPR implementation */ | ||
719 | 2 - 1, /* length */ | ||
720 | 0, /* don't halt */ | ||
721 | |||
722 | /* option vector 5: PAPR/OF options */ | ||
723 | 3 - 1, /* length */ | ||
724 | 0, /* don't ignore, don't halt */ | ||
725 | OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES, | ||
726 | }; | ||
727 | |||
728 | /* Old method - ELF header with PT_NOTE sections */ | ||
643 | static struct fake_elf { | 729 | static struct fake_elf { |
644 | Elf32_Ehdr elfhdr; | 730 | Elf32_Ehdr elfhdr; |
645 | Elf32_Phdr phdr[2]; | 731 | Elf32_Phdr phdr[2]; |
@@ -728,8 +814,26 @@ static struct fake_elf { | |||
728 | 814 | ||
729 | static void __init prom_send_capabilities(void) | 815 | static void __init prom_send_capabilities(void) |
730 | { | 816 | { |
731 | ihandle elfloader; | 817 | ihandle elfloader, root; |
818 | prom_arg_t ret; | ||
819 | |||
820 | root = call_prom("open", 1, 1, ADDR("/")); | ||
821 | if (root != 0) { | ||
822 | /* try calling the ibm,client-architecture-support method */ | ||
823 | if (call_prom_ret("call-method", 3, 2, &ret, | ||
824 | ADDR("ibm,client-architecture-support"), | ||
825 | ADDR(ibm_architecture_vec)) == 0) { | ||
826 | /* the call exists... */ | ||
827 | if (ret) | ||
828 | prom_printf("WARNING: ibm,client-architecture" | ||
829 | "-support call FAILED!\n"); | ||
830 | call_prom("close", 1, 0, root); | ||
831 | return; | ||
832 | } | ||
833 | call_prom("close", 1, 0, root); | ||
834 | } | ||
732 | 835 | ||
836 | /* no ibm,client-architecture-support call, try the old way */ | ||
733 | elfloader = call_prom("open", 1, 1, ADDR("/packages/elf-loader")); | 837 | elfloader = call_prom("open", 1, 1, ADDR("/packages/elf-loader")); |
734 | if (elfloader == 0) { | 838 | if (elfloader == 0) { |
735 | prom_printf("couldn't open /packages/elf-loader\n"); | 839 | prom_printf("couldn't open /packages/elf-loader\n"); |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index bcb83574335b..4a677d1bd4ef 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -538,7 +538,7 @@ void do_syscall_trace_enter(struct pt_regs *regs) | |||
538 | do_syscall_trace(); | 538 | do_syscall_trace(); |
539 | 539 | ||
540 | if (unlikely(current->audit_context)) | 540 | if (unlikely(current->audit_context)) |
541 | audit_syscall_entry(current, | 541 | audit_syscall_entry( |
542 | #ifdef CONFIG_PPC32 | 542 | #ifdef CONFIG_PPC32 |
543 | AUDIT_ARCH_PPC, | 543 | AUDIT_ARCH_PPC, |
544 | #else | 544 | #else |
@@ -556,8 +556,7 @@ void do_syscall_trace_leave(struct pt_regs *regs) | |||
556 | #endif | 556 | #endif |
557 | 557 | ||
558 | if (unlikely(current->audit_context)) | 558 | if (unlikely(current->audit_context)) |
559 | audit_syscall_exit(current, | 559 | audit_syscall_exit((regs->ccr&0x1000)?AUDITSC_FAILURE:AUDITSC_SUCCESS, |
560 | (regs->ccr&0x1000)?AUDITSC_FAILURE:AUDITSC_SUCCESS, | ||
561 | regs->result); | 560 | regs->result); |
562 | 561 | ||
563 | if ((test_thread_flag(TIF_SYSCALL_TRACE) | 562 | if ((test_thread_flag(TIF_SYSCALL_TRACE) |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 1d93e73a7003..684ab1d49c65 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -516,3 +516,11 @@ void probe_machine(void) | |||
516 | 516 | ||
517 | printk(KERN_INFO "Using %s machine description\n", ppc_md.name); | 517 | printk(KERN_INFO "Using %s machine description\n", ppc_md.name); |
518 | } | 518 | } |
519 | |||
520 | int check_legacy_ioport(unsigned long base_port) | ||
521 | { | ||
522 | if (ppc_md.check_legacy_ioport == NULL) | ||
523 | return 0; | ||
524 | return ppc_md.check_legacy_ioport(base_port); | ||
525 | } | ||
526 | EXPORT_SYMBOL(check_legacy_ioport); | ||
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 13e91c4d70a8..4467c49903b6 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -594,14 +594,6 @@ void ppc64_terminate_msg(unsigned int src, const char *msg) | |||
594 | printk("[terminate]%04x %s\n", src, msg); | 594 | printk("[terminate]%04x %s\n", src, msg); |
595 | } | 595 | } |
596 | 596 | ||
597 | int check_legacy_ioport(unsigned long base_port) | ||
598 | { | ||
599 | if (ppc_md.check_legacy_ioport == NULL) | ||
600 | return 0; | ||
601 | return ppc_md.check_legacy_ioport(base_port); | ||
602 | } | ||
603 | EXPORT_SYMBOL(check_legacy_ioport); | ||
604 | |||
605 | void cpu_die(void) | 597 | void cpu_die(void) |
606 | { | 598 | { |
607 | if (ppc_md.cpu_die) | 599 | if (ppc_md.cpu_die) |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 73560ef6f802..5bc2585c8036 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -279,7 +279,7 @@ static void unregister_cpu_online(unsigned int cpu) | |||
279 | } | 279 | } |
280 | #endif /* CONFIG_HOTPLUG_CPU */ | 280 | #endif /* CONFIG_HOTPLUG_CPU */ |
281 | 281 | ||
282 | static int __devinit sysfs_cpu_notify(struct notifier_block *self, | 282 | static int sysfs_cpu_notify(struct notifier_block *self, |
283 | unsigned long action, void *hcpu) | 283 | unsigned long action, void *hcpu) |
284 | { | 284 | { |
285 | unsigned int cpu = (unsigned int)(long)hcpu; | 285 | unsigned int cpu = (unsigned int)(long)hcpu; |
@@ -297,7 +297,7 @@ static int __devinit sysfs_cpu_notify(struct notifier_block *self, | |||
297 | return NOTIFY_OK; | 297 | return NOTIFY_OK; |
298 | } | 298 | } |
299 | 299 | ||
300 | static struct notifier_block __devinitdata sysfs_cpu_nb = { | 300 | static struct notifier_block sysfs_cpu_nb = { |
301 | .notifier_call = sysfs_cpu_notify, | 301 | .notifier_call = sysfs_cpu_notify, |
302 | }; | 302 | }; |
303 | 303 | ||
@@ -322,13 +322,31 @@ static void register_nodes(void) | |||
322 | } | 322 | } |
323 | } | 323 | } |
324 | } | 324 | } |
325 | |||
326 | int sysfs_add_device_to_node(struct sys_device *dev, int nid) | ||
327 | { | ||
328 | struct node *node = &node_devices[nid]; | ||
329 | return sysfs_create_link(&node->sysdev.kobj, &dev->kobj, | ||
330 | kobject_name(&dev->kobj)); | ||
331 | } | ||
332 | |||
333 | void sysfs_remove_device_from_node(struct sys_device *dev, int nid) | ||
334 | { | ||
335 | struct node *node = &node_devices[nid]; | ||
336 | sysfs_remove_link(&node->sysdev.kobj, kobject_name(&dev->kobj)); | ||
337 | } | ||
338 | |||
325 | #else | 339 | #else |
326 | static void register_nodes(void) | 340 | static void register_nodes(void) |
327 | { | 341 | { |
328 | return; | 342 | return; |
329 | } | 343 | } |
344 | |||
330 | #endif | 345 | #endif |
331 | 346 | ||
347 | EXPORT_SYMBOL_GPL(sysfs_add_device_to_node); | ||
348 | EXPORT_SYMBOL_GPL(sysfs_remove_device_from_node); | ||
349 | |||
332 | /* Only valid if CPU is present. */ | 350 | /* Only valid if CPU is present. */ |
333 | static ssize_t show_physical_id(struct sys_device *dev, char *buf) | 351 | static ssize_t show_physical_id(struct sys_device *dev, char *buf) |
334 | { | 352 | { |
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S index 8d1522690501..cf56a1d499ff 100644 --- a/arch/powerpc/kernel/systbl.S +++ b/arch/powerpc/kernel/systbl.S | |||
@@ -324,6 +324,20 @@ COMPAT_SYS(ppoll) | |||
324 | SYSCALL(unshare) | 324 | SYSCALL(unshare) |
325 | SYSCALL(splice) | 325 | SYSCALL(splice) |
326 | SYSCALL(tee) | 326 | SYSCALL(tee) |
327 | SYSCALL(vmsplice) | ||
328 | COMPAT_SYS(openat) | ||
329 | SYSCALL(mkdirat) | ||
330 | SYSCALL(mknodat) | ||
331 | SYSCALL(fchownat) | ||
332 | COMPAT_SYS(futimesat) | ||
333 | SYSX(sys_newfstatat, sys_fstatat64, sys_fstatat64) | ||
334 | SYSCALL(unlinkat) | ||
335 | SYSCALL(renameat) | ||
336 | SYSCALL(linkat) | ||
337 | SYSCALL(symlinkat) | ||
338 | SYSCALL(readlinkat) | ||
339 | SYSCALL(fchmodat) | ||
340 | SYSCALL(faccessat) | ||
327 | 341 | ||
328 | /* | 342 | /* |
329 | * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c | 343 | * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c |