From 91d5d45ee0a8978870fd12e5c3fe394a530ec2ed Mon Sep 17 00:00:00 2001 From: Hendrik Brueckner Date: Thu, 25 Dec 2008 13:38:58 +0100 Subject: [S390] iucv: Locking free version of iucv_message_(receive|send) Provide a locking free version of iucv_message_receive and iucv_message_send that do not call local_bh_enable in a spin_lock_(bh|irqsave)() context. Signed-off-by: Hendrik Brueckner --- include/net/iucv/iucv.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'include') diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index fd70adbb3566..5e310c8d8e2f 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h @@ -337,11 +337,34 @@ int iucv_message_purge(struct iucv_path *path, struct iucv_message *msg, * established paths. This function will deal with RMDATA messages * embedded in struct iucv_message as well. * + * Locking: local_bh_enable/local_bh_disable + * * Returns the result from the CP IUCV call. */ int iucv_message_receive(struct iucv_path *path, struct iucv_message *msg, u8 flags, void *buffer, size_t size, size_t *residual); +/** + * __iucv_message_receive + * @path: address of iucv path structure + * @msg: address of iucv msg structure + * @flags: flags that affect how the message is received (IUCV_IPBUFLST) + * @buffer: address of data buffer or address of struct iucv_array + * @size: length of data buffer + * @residual: + * + * This function receives messages that are being sent to you over + * established paths. This function will deal with RMDATA messages + * embedded in struct iucv_message as well. + * + * Locking: no locking. + * + * Returns the result from the CP IUCV call. + */ +int __iucv_message_receive(struct iucv_path *path, struct iucv_message *msg, + u8 flags, void *buffer, size_t size, + size_t *residual); + /** * iucv_message_reject * @path: address of iucv path structure @@ -386,11 +409,33 @@ int iucv_message_reply(struct iucv_path *path, struct iucv_message *msg, * transmitted is in a buffer and this is a one-way message and the * receiver will not reply to the message. * + * Locking: local_bh_enable/local_bh_disable + * * Returns the result from the CP IUCV call. */ int iucv_message_send(struct iucv_path *path, struct iucv_message *msg, u8 flags, u32 srccls, void *buffer, size_t size); +/** + * __iucv_message_send + * @path: address of iucv path structure + * @msg: address of iucv msg structure + * @flags: how the message is sent (IUCV_IPRMDATA, IUCV_IPPRTY, IUCV_IPBUFLST) + * @srccls: source class of message + * @buffer: address of data buffer or address of struct iucv_array + * @size: length of send buffer + * + * This function transmits data to another application. Data to be + * transmitted is in a buffer and this is a one-way message and the + * receiver will not reply to the message. + * + * Locking: no locking. + * + * Returns the result from the CP IUCV call. + */ +int __iucv_message_send(struct iucv_path *path, struct iucv_message *msg, + u8 flags, u32 srccls, void *buffer, size_t size); + /** * iucv_message_send2way * @path: address of iucv path structure -- cgit v1.2.3-59-g8ed1b From 32272a26974d2027384fd4010cd1780fca425d94 Mon Sep 17 00:00:00 2001 From: Martin Schwidefsky Date: Thu, 25 Dec 2008 13:38:59 +0100 Subject: [S390] __page_to_pfn warnings For CONFIG_SPARSEMEM_VMEMMAP=y on s390 I get warnings like init/main.c: In function 'start_kernel': init/main.c:641: warning: format '%08lx' expects type 'long unsigned int', but argument 2 has type 'int' The warning can be suppressed with a cast to unsigned long in the CONFIG_SPARSEMEM_VMEMMAP=y version of __page_to_pfn. Signed-off-by: Martin Schwidefsky --- include/asm-generic/memory_model.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index 18546d8eb78e..36fa286adad5 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h @@ -49,7 +49,7 @@ /* memmap is virtually contigious. */ #define __pfn_to_page(pfn) (vmemmap + (pfn)) -#define __page_to_pfn(page) ((page) - vmemmap) +#define __page_to_pfn(page) (unsigned long)((page) - vmemmap) #elif defined(CONFIG_SPARSEMEM) /* -- cgit v1.2.3-59-g8ed1b