Path: blob/master/arch/tile/include/asm/hardwall.h
10819 views
/*1* Copyright 2010 Tilera Corporation. All Rights Reserved.2*3* This program is free software; you can redistribute it and/or4* modify it under the terms of the GNU General Public License5* as published by the Free Software Foundation, version 2.6*7* This program is distributed in the hope that it will be useful, but8* WITHOUT ANY WARRANTY; without even the implied warranty of9* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or10* NON INFRINGEMENT. See the GNU General Public License for11* more details.12*13* Provide methods for the HARDWALL_FILE for accessing the UDN.14*/1516#ifndef _ASM_TILE_HARDWALL_H17#define _ASM_TILE_HARDWALL_H1819#include <linux/ioctl.h>2021#define HARDWALL_IOCTL_BASE 0xa22223/*24* The HARDWALL_CREATE() ioctl is a macro with a "size" argument.25* The resulting ioctl value is passed to the kernel in conjunction26* with a pointer to a little-endian bitmask of cpus, which must be27* physically in a rectangular configuration on the chip.28* The "size" is the number of bytes of cpu mask data.29*/30#define _HARDWALL_CREATE 131#define HARDWALL_CREATE(size) \32_IOC(_IOC_READ, HARDWALL_IOCTL_BASE, _HARDWALL_CREATE, (size))3334#define _HARDWALL_ACTIVATE 235#define HARDWALL_ACTIVATE \36_IO(HARDWALL_IOCTL_BASE, _HARDWALL_ACTIVATE)3738#define _HARDWALL_DEACTIVATE 339#define HARDWALL_DEACTIVATE \40_IO(HARDWALL_IOCTL_BASE, _HARDWALL_DEACTIVATE)4142#define _HARDWALL_GET_ID 443#define HARDWALL_GET_ID \44_IO(HARDWALL_IOCTL_BASE, _HARDWALL_GET_ID)4546#ifndef __KERNEL__4748/* This is the canonical name expected by userspace. */49#define HARDWALL_FILE "/dev/hardwall"5051#else5253/* /proc hooks for hardwall. */54struct proc_dir_entry;55#ifdef CONFIG_HARDWALL56void proc_tile_hardwall_init(struct proc_dir_entry *root);57int proc_pid_hardwall(struct task_struct *task, char *buffer);58#else59static inline void proc_tile_hardwall_init(struct proc_dir_entry *root) {}60#endif6162#endif6364#endif /* _ASM_TILE_HARDWALL_H */656667