Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/221/?format=api
{ "id": 221, "url": "http://patchwork.ozlabs.org/api/patches/221/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1220969561.3334.7.camel@localhost.localdomain/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<1220969561.3334.7.camel@localhost.localdomain>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1220969561.3334.7.camel@localhost.localdomain/", "date": "2008-09-09T14:12:41", "name": "[PATCH] Correct printk %pF to work on all architectures", "commit_ref": "deac93df26b20cf8438339b5935b5f5643bc30c9", "pull_url": null, "state": "accepted", "archived": true, "hash": "e7e30aed7c20e183a6ddeb3b200a45cc935a0754", "submitter": { "id": 96, "url": "http://patchwork.ozlabs.org/api/people/96/?format=api", "name": "James Bottomley", "email": "James.Bottomley@HansenPartnership.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1220969561.3334.7.camel@localhost.localdomain/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/221/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/221/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org>", "X-Original-To": [ "patchwork@ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Delivered-To": [ "patchwork@ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Received": [ "from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 833D8DE429\n\tfor <patchwork@ozlabs.org>; Wed, 10 Sep 2008 00:13:03 +1000 (EST)", "from accolon.hansenpartnership.com (accolon.hansenpartnership.com\n\t[76.243.235.52]) by ozlabs.org (Postfix) with ESMTP id 174CBDDD04\n\tfor <linuxppc-dev@ozlabs.org>;\n\tWed, 10 Sep 2008 00:12:45 +1000 (EST)", "from localhost (localhost [127.0.0.1])\n\tby accolon.hansenpartnership.com (Postfix) with ESMTP id 5219D8399;\n\tTue, 9 Sep 2008 09:12:41 -0500 (CDT)", "from accolon.hansenpartnership.com ([127.0.0.1])\n\tby localhost (redscar.int.hansenpartnership.com [127.0.0.1])\n\t(amavisd-new, port 10024)\n\twith ESMTP id z3fE+KhRkJdv; Tue, 9 Sep 2008 09:12:40 -0500 (CDT)", "from [153.66.150.222] (mulgrave-w.int.hansenpartnership.com\n\t[153.66.150.222])\n\tby accolon.hansenpartnership.com (Postfix) with ESMTP id 9C1D57F62;\n\tTue, 9 Sep 2008 09:12:39 -0500 (CDT)" ], "Subject": "RE: [PATCH] Correct printk %pF to work on all architectures", "From": "James Bottomley <James.Bottomley@HansenPartnership.com>", "To": "Linus Torvalds <torvalds@linux-foundation.org>", "In-Reply-To": "<57C9024A16AD2D4C97DC78E552063EA30A0DC383@orsmsx505.amr.corp.intel.com>", "References": "<1220473137.3254.29.camel@localhost.localdomain>\n\t<alpine.LFD.1.10.0809031419560.3515@nehalem.linux-foundation.org>\n\t<1220481754.3254.42.camel@localhost.localdomain>\n\t<alpine.LFD.1.10.0809031546310.3515@nehalem.linux-foundation.org>\n\t<1220482853.3254.47.camel@localhost.localdomain>\n\t<alpine.LFD.1.10.0809031602270.3515@nehalem.linux-foundation.org>\n\t<1220484812.3254.59.camel@localhost.localdomain>\n\t<alpine.LFD.1.10.0809031636320.3515@nehalem.linux-foundation.org>\n\t<1220492616.3254.64.camel@localhost.localdomain>\n\t<1220567811.4879.85.camel@pasglop>\n\t<57C9024A16AD2D4C97DC78E552063EA30A0DC383@orsmsx505.amr.corp.intel.com>", "Date": "Tue, 09 Sep 2008 09:12:41 -0500", "Message-Id": "<1220969561.3334.7.camel@localhost.localdomain>", "Mime-Version": "1.0", "X-Mailer": "Evolution 2.22.3.1 (2.22.3.1-1.fc9) ", "Cc": "\"linux-arch@vger.kernel.org\" <linux-arch@vger.kernel.org>, \"Luck,\n\tTony\" <tony.luck@intel.com>,\n\t\"linux-ia64@vger.kernel.org\" <linux-ia64@vger.kernel.org>,\n\tParisc List <linux-parisc@vger.kernel.org>,\n\t\"linuxppc-dev@ozlabs.org\" <linuxppc-dev@ozlabs.org>", "X-BeenThere": "linuxppc-dev@ozlabs.org", "X-Mailman-Version": "2.1.11", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>", "List-Unsubscribe": "<https://ozlabs.org/mailman/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://ozlabs.org/pipermail/linuxppc-dev>", "List-Post": "<mailto:linuxppc-dev@ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@ozlabs.org?subject=help>", "List-Subscribe": "<https://ozlabs.org/mailman/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org", "Errors-To": "linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org" }, "content": "OK, so could we get this in to -rc5 please? It's a bug fix for parisc\nsince we're currently printing rubbish.\n\nJames", "diff": "diff --git a/arch/ia64/include/asm/sections.h b/arch/ia64/include/asm/sections.h\nindex 7286e4a..a7acad2 100644\n--- a/arch/ia64/include/asm/sections.h\n+++ b/arch/ia64/include/asm/sections.h\n@@ -21,5 +21,8 @@ extern char __start_gate_brl_fsys_bubble_down_patchlist[], __end_gate_brl_fsys_b\n extern char __start_unwind[], __end_unwind[];\n extern char __start_ivt_text[], __end_ivt_text[];\n \n+#undef dereference_function_descriptor\n+void *dereference_function_descriptor(void *);\n+\n #endif /* _ASM_IA64_SECTIONS_H */\n \ndiff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c\nindex 29aad34..545626f 100644\n--- a/arch/ia64/kernel/module.c\n+++ b/arch/ia64/kernel/module.c\n@@ -31,9 +31,11 @@\n #include <linux/elf.h>\n #include <linux/moduleloader.h>\n #include <linux/string.h>\n+#include <linux/uaccess.h>\n #include <linux/vmalloc.h>\n \n #include <asm/patch.h>\n+#include <asm/sections.h>\n #include <asm/unaligned.h>\n \n #define ARCH_MODULE_DEBUG 0\n@@ -941,3 +943,13 @@ module_arch_cleanup (struct module *mod)\n \tif (mod->arch.core_unw_table)\n \t\tunw_remove_unwind_table(mod->arch.core_unw_table);\n }\n+\n+void *dereference_function_descriptor(void *ptr)\n+{\n+\tstruct fdesc *desc = ptr;\n+\tvoid *p;\n+\n+\tif (!probe_kernel_address(&desc->ip, p))\n+\t\tptr = p;\n+\treturn ptr;\n+}\ndiff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c\nindex fdacdd4..44138c3 100644\n--- a/arch/parisc/kernel/module.c\n+++ b/arch/parisc/kernel/module.c\n@@ -47,7 +47,9 @@\n #include <linux/string.h>\n #include <linux/kernel.h>\n #include <linux/bug.h>\n+#include <linux/uaccess.h>\n \n+#include <asm/sections.h>\n #include <asm/unwind.h>\n \n #if 0\n@@ -860,3 +862,15 @@ void module_arch_cleanup(struct module *mod)\n \tderegister_unwind_table(mod);\n \tmodule_bug_cleanup(mod);\n }\n+\n+#ifdef CONFIG_64BIT\n+void *dereference_function_descriptor(void *ptr)\n+{\n+\tElf64_Fdesc *desc = ptr;\n+\tvoid *p;\n+\n+\tif (!probe_kernel_address(&desc->addr, p))\n+\t\tptr = p;\n+\treturn ptr;\n+}\n+#endif\ndiff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/asm/sections.h\nindex 916018e..7710e9e 100644\n--- a/arch/powerpc/include/asm/sections.h\n+++ b/arch/powerpc/include/asm/sections.h\n@@ -16,6 +16,9 @@ static inline int in_kernel_text(unsigned long addr)\n \treturn 0;\n }\n \n+#undef dereference_function_descriptor\n+void *dereference_function_descriptor(void *);\n+\n #endif\n \n #endif /* __KERNEL__ */\ndiff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c\nindex ee6a298..ad79de2 100644\n--- a/arch/powerpc/kernel/module_64.c\n+++ b/arch/powerpc/kernel/module_64.c\n@@ -21,8 +21,9 @@\n #include <linux/err.h>\n #include <linux/vmalloc.h>\n #include <linux/bug.h>\n+#include <linux/uaccess.h>\n #include <asm/module.h>\n-#include <asm/uaccess.h>\n+#include <asm/sections.h>\n #include <asm/firmware.h>\n #include <asm/code-patching.h>\n #include <linux/sort.h>\n@@ -451,3 +452,13 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,\n \n \treturn 0;\n }\n+\n+void *dereference_function_descriptor(void *ptr)\n+{\n+\tstruct ppc64_opd_entry *desc = ptr;\n+\tvoid *p;\n+\n+\tif (!probe_kernel_address(&desc->funcaddr, p))\n+\t\tptr = p;\n+\treturn ptr;\n+}\ndiff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h\nindex 8feeae1..79a7ff9 100644\n--- a/include/asm-generic/sections.h\n+++ b/include/asm-generic/sections.h\n@@ -14,4 +14,10 @@ extern char __kprobes_text_start[], __kprobes_text_end[];\n extern char __initdata_begin[], __initdata_end[];\n extern char __start_rodata[], __end_rodata[];\n \n+/* function descriptor handling (if any). Override\n+ * in asm/sections.h */\n+#ifndef dereference_function_descriptor\n+#define dereference_function_descriptor(p) (p)\n+#endif\n+\n #endif /* _ASM_GENERIC_SECTIONS_H_ */\ndiff --git a/include/asm-parisc/sections.h b/include/asm-parisc/sections.h\nindex fdd43ec..9d13c35 100644\n--- a/include/asm-parisc/sections.h\n+++ b/include/asm-parisc/sections.h\n@@ -4,4 +4,9 @@\n /* nothing to see, move along */\n #include <asm-generic/sections.h>\n \n+#ifdef CONFIG_64BIT\n+#undef dereference_function_descriptor\n+void *dereference_function_descriptor(void *);\n+#endif\n+\n #endif\ndiff --git a/lib/vsprintf.c b/lib/vsprintf.c\nindex d8d1d11..c399bc1 100644\n--- a/lib/vsprintf.c\n+++ b/lib/vsprintf.c\n@@ -27,6 +27,7 @@\n \n #include <asm/page.h>\t\t/* for PAGE_SIZE */\n #include <asm/div64.h>\n+#include <asm/sections.h>\t/* for dereference_function_descriptor() */\n \n /* Works only for digits and letters, but small and fast */\n #define TOLOWER(x) ((x) | 0x20)\n@@ -513,16 +514,6 @@ static char *string(char *buf, char *end, char *s, int field_width, int precisio\n \treturn buf;\n }\n \n-static inline void *dereference_function_descriptor(void *ptr)\n-{\n-#if defined(CONFIG_IA64) || defined(CONFIG_PPC64)\n-\tvoid *p;\n-\tif (!probe_kernel_address(ptr, p))\n-\t\tptr = p;\n-#endif\n-\treturn ptr;\n-}\n-\n static char *symbol_string(char *buf, char *end, void *ptr, int field_width, int precision, int flags)\n {\n \tunsigned long value = (unsigned long) ptr;\n", "prefixes": [] }