<commit_before>/*
 * Copyright IBM Corp. 2012
 *
 * Author(s):
 *   <NAME> <<EMAIL>>
 */

#define COMPONENT "zPCI"
#define pr_fmt(fmt) COMPONENT ": " fmt

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <asm/pci_clp.h>

/*
 * Call Logical Processor
 * Retry logic is handled by the caller.
 */
static inline u8 clp_instr(void *req)
{
	u64 ilpm;
	u8 cc;

	asm volatile (
		"	.insn	rrf,0xb9a00000,%[ilpm],%[req],0x0,0x2\n"
		"	ipm	%[cc]\n"
		"	srl	%[cc],28\n"
		: [cc] "=d" (cc), [ilpm] "=d" (ilpm)
		: [req] "a" (req)
		: "cc", "memory");
	return cc;
}

static void *clp_alloc_block(void)
{
	struct page *page = alloc_pages(GFP_KERNEL, get_order(CLP_BLK_SIZE));
	return (page) ? page_address(page) : NULL;
}

static void clp_free_block(void *ptr)
{
	free_pages((unsigned long) ptr, get_order(CLP_BLK_SIZE));
}<commit_msg>s390/pci: cleanup clp inline assembly<commit_after>/*
 * Copyright IBM Corp. 2012
 *
 * Author(s):
 *   <NAME> <<EMAIL>>
 */

#define COMPONENT "zPCI"
#define pr_fmt(fmt) COMPONENT ": " fmt

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <asm/pci_clp.h>

/*
 * Call Logical Processor
 * Retry logic is handled by the caller.
 */
static inline u8 clp_instr(void *data)
{
	struct { u8 _[CLP_BLK_SIZE]; } *req = data;
	u64 ignored;
	u8 cc;

	asm volatile (
		"	.insn	rrf,0xb9a00000,%[ign],%[req],0x0,0x2\n"
		"	ipm	%[cc]\n"
		"	srl	%[cc],28\n"
		: [cc] "=d" (cc), [ign] "=d" (ignored), "+m" (*req)
		: [req] "a" (req)
		: "cc");
	return cc;
}

static void *clp_alloc_block(void)
{
	struct page *page = alloc_pages(GFP_KERNEL, get_order(CLP_BLK_SIZE));
	return (page) ? page_address(page) : NULL;
}

static void clp_free_block(void *ptr)
{
	free_pages((unsigned long) ptr, get_order(CLP_BLK_SIZE));
}
{'fraction_non_alphanumeric': 0.18607123870281764, 'fraction_numerical': 0.024455077086656035, 'mean_word_length': 4.286516853932584, 'pattern_counts': {'":': 2, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3478643', 'n_tokens_mistral': 878, 'n_tokens_neox': 836, 'n_words': 184}