Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9718
b: refs/heads/master
c: 2256c13
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Oct 7, 2005
1 parent 2cebfe5 commit 11ab3b7
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 276 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ab501db8cb6659efdf04034e0de6b44c059a51b
refs/heads/master: 2256c13b992b09f1f9563c26457aa048da2865df
161 changes: 0 additions & 161 deletions trunk/Documentation/keys-request-key.txt

This file was deleted.

18 changes: 7 additions & 11 deletions trunk/Documentation/keys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,6 @@ The main syscalls are:
/sbin/request-key will be invoked in an attempt to obtain a key. The
callout_info string will be passed as an argument to the program.

See also Documentation/keys-request-key.txt.


The keyctl syscall functions are:

Expand Down Expand Up @@ -535,8 +533,8 @@ The keyctl syscall functions are:

(*) Read the payload data from a key:

long keyctl(KEYCTL_READ, key_serial_t keyring, char *buffer,
size_t buflen);
key_serial_t keyctl(KEYCTL_READ, key_serial_t keyring, char *buffer,
size_t buflen);

This function attempts to read the payload data from the specified key
into the buffer. The process must have read permission on the key to
Expand All @@ -557,9 +555,9 @@ The keyctl syscall functions are:

(*) Instantiate a partially constructed key.

long keyctl(KEYCTL_INSTANTIATE, key_serial_t key,
const void *payload, size_t plen,
key_serial_t keyring);
key_serial_t keyctl(KEYCTL_INSTANTIATE, key_serial_t key,
const void *payload, size_t plen,
key_serial_t keyring);

If the kernel calls back to userspace to complete the instantiation of a
key, userspace should use this call to supply data for the key before the
Expand All @@ -578,8 +576,8 @@ The keyctl syscall functions are:

(*) Negatively instantiate a partially constructed key.

long keyctl(KEYCTL_NEGATE, key_serial_t key,
unsigned timeout, key_serial_t keyring);
key_serial_t keyctl(KEYCTL_NEGATE, key_serial_t key,
unsigned timeout, key_serial_t keyring);

If the kernel calls back to userspace to complete the instantiation of a
key, userspace should use this call mark the key as negative before the
Expand Down Expand Up @@ -690,8 +688,6 @@ payload contents" for more information.
If successful, the key will have been attached to the default keyring for
implicitly obtained request-key keys, as set by KEYCTL_SET_REQKEY_KEYRING.

See also Documentation/keys-request-key.txt.


(*) When it is no longer required, the key should be released using:

Expand Down
64 changes: 51 additions & 13 deletions trunk/arch/sparc64/kernel/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <asm/system.h>
#include <asm/ebus.h>
#include <asm/isa.h>
#include <asm/auxio.h>

#include <linux/unistd.h>
Expand Down Expand Up @@ -100,46 +101,83 @@ static int powerd(void *__unused)
return 0;
}

static int __init has_button_interrupt(struct linux_ebus_device *edev)
static int __init has_button_interrupt(unsigned int irq, int prom_node)
{
if (edev->irqs[0] == PCI_IRQ_NONE)
if (irq == PCI_IRQ_NONE)
return 0;
if (!prom_node_has_property(edev->prom_node, "button"))
if (!prom_node_has_property(prom_node, "button"))
return 0;

return 1;
}

void __init power_init(void)
static int __init power_probe_ebus(struct resource **resp, unsigned int *irq_p, int *prom_node_p)
{
struct linux_ebus *ebus;
struct linux_ebus_device *edev;

for_each_ebus(ebus) {
for_each_ebusdev(edev, ebus) {
if (!strcmp(edev->prom_name, "power")) {
*resp = &edev->resource[0];
*irq_p = edev->irqs[0];
*prom_node_p = edev->prom_node;
return 0;
}
}
}
return -ENODEV;
}

static int __init power_probe_isa(struct resource **resp, unsigned int *irq_p, int *prom_node_p)
{
struct sparc_isa_bridge *isa_bus;
struct sparc_isa_device *isa_dev;

for_each_isa(isa_bus) {
for_each_isadev(isa_dev, isa_bus) {
if (!strcmp(isa_dev->prom_name, "power")) {
*resp = &isa_dev->resource;
*irq_p = isa_dev->irq;
*prom_node_p = isa_dev->prom_node;
return 0;
}
}
}
return -ENODEV;
}

void __init power_init(void)
{
struct resource *res = NULL;
unsigned int irq;
int prom_node;
static int invoked;

if (invoked)
return;
invoked = 1;

for_each_ebus(ebus) {
for_each_ebusdev(edev, ebus) {
if (!strcmp(edev->prom_name, "power"))
goto found;
}
}
if (!power_probe_ebus(&res, &irq, &prom_node))
goto found;

if (!power_probe_isa(&res, &irq, &prom_node))
goto found;

return;

found:
power_reg = ioremap(edev->resource[0].start, 0x4);
power_reg = ioremap(res->start, 0x4);
printk("power: Control reg at %p ... ", power_reg);
poweroff_method = machine_halt; /* able to use the standard halt */
if (has_button_interrupt(edev)) {
if (has_button_interrupt(irq, prom_node)) {
if (kernel_thread(powerd, NULL, CLONE_FS) < 0) {
printk("Failed to start power daemon.\n");
return;
}
printk("powerd running.\n");

if (request_irq(edev->irqs[0],
if (request_irq(irq,
power_handler, SA_SHIRQ, "power", NULL) < 0)
printk("power: Error, cannot register IRQ handler.\n");
} else {
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/pcmcia/ti113x.h
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,6 @@ static int ti1250_override(struct yenta_socket *socket)
* Some fixup code to make everybody happy (TM).
*/

#ifdef CONFIG_CARDBUS
/**
* set/clear various test bits:
* Defaults to clear the bit.
Expand Down Expand Up @@ -928,16 +927,14 @@ static void ene_tune_bridge(struct pcmcia_socket *sock, struct pci_bus *bus)
config_writeb(socket, ENE_TEST_C9, test_c9);
}


static int ene_override(struct yenta_socket *socket)
{
/* install tune_bridge() function */
socket->socket.tune_bridge = ene_tune_bridge;

return ti1250_override(socket);
}
#else
# define ene_override ti1250_override
#endif

#endif /* _LINUX_TI113X_H */

6 changes: 3 additions & 3 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1551,19 +1551,19 @@ int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd)
if (nd->last_type != LAST_NORM)
goto exit;
if (nd->last.name[nd->last.len]) {
__putname(nd->last.name);
putname(nd->last.name);
goto exit;
}
error = -ELOOP;
if (count++==32) {
__putname(nd->last.name);
putname(nd->last.name);
goto exit;
}
dir = nd->dentry;
down(&dir->d_inode->i_sem);
path.dentry = __lookup_hash(&nd->last, nd->dentry, nd);
path.mnt = nd->mnt;
__putname(nd->last.name);
putname(nd->last.name);
goto do_last;
}

Expand Down
Loading

0 comments on commit 11ab3b7

Please sign in to comment.